Hello, I’ve successfully made an invisibility script before, but I was wondering about ways to make it so that the local player turns invisible to everyone but themselves. I’d really appreciate any help, thanks!
1 Like
Make it kind of an opposite invisibility, just make a normal invisibility script, and make a local one to turn the player visible.
1 Like
I would use a remotevent to tell the server that you want to become invisible. Then use the :FireAllClients() function to tell everyone to make that person invisible. Before making them invisible, make sure that the player becoming invisible isn’t yourself. Like this:
--local script:
remotevent:FireServer()
--server script
remotevent.OnServerEvent:Connect(function(player)
remotevent:FireAllClients(player)
end)
--local script:
local player = game.Players.LocalPlayer
remotevent.OnClientEvent:Connect(function(invisibleplayer)
if invisbileplayer ~= player then
--make invisibleplayer invisible
end
end)
3 Likes
I was able to make the script I had in mind, thank you!