Player Disappear and Re Appear on Key Press

Hey there!
I have seen in several games recently (SCP games) that the higher group ranks have special abilities where they can press a key or button, then their character disappears with a cloud of smoke, and they can walk around and noclip (I think) while invisible to other players, then they can reappear with a poof of smoke, just like they disappeared. This would be neat to be able to do, but I don’t know how to make a player disappear and re appear like that after pressing a key or button. I’m assuming I’d have to make their character local for the invisible part of it, but I’m not sure how to do that. How can I create something similar to this?

I would first use UserInputService to check when they press a certain key, then I would use a remote event to tell the server to make them invisible. On the server side, loop through all of the characters descendants, check if it is a base part, and if it is then make it’s transparency 1. Do you know how to do this, if not I can help you with certain aspects of it.

Yes. I’m familiar with the looping through the character. However, I’m not very experienced with UserInputService, yet.

This would be a sample code for UserInputService, this must be in a local script.

local UIS = game:GetService("UserInputService")

UIS.InputBegan:Connect(function(input)    --fires whenever they use their keyboard
      if Input.KeyCode == Enum.KeyCode.F then --check if it is F key, you could change this to whatever you want.
            print("F Key Pressed") 
      end
end
2 Likes