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

Changing color of a part on a specific player?

In this scenario I have a part, attached to the back of a specific player. It is in an accesory in the "Player" folder in game. I have a gamepass that allows you to change the color of said part attached to player. It doesn't seem to be working. I am having trouble because I only want it to happen to the player that hits the GUI, not every player in the game...

script.Parent.MouseButton1Down:Connect(function()
		  wait(0.5)
		  game:GetService('Players').Egg.Handle.Material = Enum.Material.Neon
end)

1 answer

Try this, I think you were just referencing the player incorrectly

script.Parent.MouseButton1Down:Connect(function()
          wait(0.5)
          game.Players.LocalPlayer.Egg.Handle.Material = Enum.Material.Neon
end)

2 comments

0

this is right but im pretty sure the "Egg" hat's handle contains a mesh so changing material wont be visible sadly, btw im wearing it :3

0

When I try this I get the error message "Egg is not a valid member of Player? Even though I already have the script to equip it in an accessory folder when I join the game... (Btw the egg isn't a roblox egg, its a union piece)

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