Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Invisble on keybind press?

So, im sure it's not that complicated but for some reason I can't it to work. Im trying to make it so when the player presses "q" it make them go invisible until they let go of It. Any ideas?

4 comments

0

Post an attempt of your script

0

Yes that would be handy so we could tell you what else to add instead of giving you the whole script.

0

Also do you want the player to become invisible on only their screen or on everybody's screen?

0

It would be for evrybody's screen. I know im forgetting something in this and i know it's super easy but i just can't put my finger on it but here is the script

1 answer

You could loop through all the parts of the character to change their transparency

for i,v in pairs(character:GetChildren()) do
	if v:IsA("BasePart") then
		if v.Name ~= "HumanoidRootPart" then
			v.Transparency = 1
		end
	end
end

4 comments

0

Well he hasn't come out with his script yet so we can't assume what exactly we need to add but we can't give him the whole script.

0

I'm just giving ideas

0

Okay then

0

game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key) if key == "q" then body.Parent:findFirstChild("Humanoid") body.CanCollide = false body.Parent.Torso.Transparency = 1 body.Parent.Head.Transparency = 1 body.Parent["Left Arm"].Transparency = 1 body.Parent["Right Arm"].Transparency = 1 body.Parent["Left Leg"].Transparency = 1 body.Parent["Right Leg"].Transparency = 1 end end

This discussion is preserved as it was. New answers, comments, and votes are closed.