Trying to create a noclip script similar to the one in vMenu, but when I go in NoClip + Invisibility I can’t see my character which is kinda bothering
local myPed = GetPlayerPed(-1)
if isInvisible then
SetEntityVisible(myPed, false, false)
else
SetEntityVisible(myPed, true, false)
end
I tried using this SetEntityLocallyInvisible but no luck
1 Like
vMenu and other similar noclips use this native.
Alpha is basically the setting for transparency, it is what the A stands for in rgba
.
Also tried it
SetEntityAlpha(myPed, 127, false)
but people can see me !
Change GetPlayerPed(-1) with PlayerPedId()
Same thing, When I go invisible, no one can see me, but I also can’t see myself
I use SetEntityAlpha(PlayerPedId(), 51, false)
that makes your entity basically transparent to other players but, you can still slightly see your ped.
1 Like
I use this
NetworkSetEntityInvisibleToNetwork(PlayerPedId(),true)
SetEntityVisible(PlayerPedId(),false,false)
SetEntityAlpha(PlayerPedId(), 100, false)
SetLocalPlayerVisibleLocally(true)
You can change the 100 value to change your visibility for yourself
And for a version of yours
local myPed = PlayerPedId()
NetworkSetEntityInvisibleToNetwork(myPed,isInvisible)
SetEntityVisible(myPed,not isInvisible,not isInvisible)
if isInvisible then
SetEntityAlpha(myPed, 100, false)
else
SetEntityAlpha(myPed, 255, false)
end
SetLocalPlayerVisibleLocally(true)
1 Like
This one working, but still can’t see myped, using qbcore
1 Like
You can use the logic behind vMenu noclip, here is the snippet
SetEntityVisible(noclipEntity, false, false);
SetLocalPlayerVisibleLocally(true);
SetEntityAlpha(noclipEntity, (int)(255 * 0.2), 0);