I need help with this

So basically i need to make a part in rep storage get parented to the player whenever they press a button and remove it when they press it again.
I also want it to be seen by all players but not get parented to anyone except the player that pushed the UI button.
I currently have two scripts, one that is able to add the parts but they get parented to all players, so that’s no good.
And one that’s able to put the parts on the player, but other players don’t see it, and that’s also no good.

Can anyone please help?

2 Likes

Can I see code 1? ahhhhhhhhhh

I’m not able to help with using replicated storage, but just in general, you have to make a clone of the part in replicated storage ( :Clone() ), parent it to the character (game.players.localplayer.character), then (if you need to) set it’s CFrame/Position to the player.

To know which player requested the hat, you should fire a remote event. the 1st parameter is the player, so you can just use player.character, then set the cloned part’s parent to the character.

I hope that helps!

It doesn’t really matter because its not quite what I want.