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

How to get Player Model in workspace with a script ???

P/s : I tried

Player = game.Players.LocalPlayer
Char = Player.Character

2 comments

0

Explain more, issues, what you tried

0

I want to make a script that if the player press a key then Player Model Transperancy = 1

1 answer

✓ Accepted answer

Solution you put it inside of a local script, then change the key.


Player = game.Players.LocalPlayer
Key = Enum.KeyCode.A

Player.CharacterAdded:connect(function(Character)
	game:GetService("UserInputService").InputBegan:Connect(function(input)
		
		if input.KeyCode == Key then
			
			for _,Part in pairs(Character:GetDescendants()) do
				if Part:IsA("BasePart") or Part:IsA("Decal") then
					Part.Transparency = 1
				end
			end
		end
	end)	
end)

2 comments

0

Don't put inputbegan inside characteradded

0

Please use Connect instead of connect as it is deprecated

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