How do I parent an object to StarterCharacterScripts?

I’m trying to make a shop. But in order to work the item needs to be parented to
StarterCharacterScripts.
But, I’m not sure to this. I tried multiple things like:

  • game.Players.LocalPlayer:WaitForChild(“PlayerScripts”)
  • game.StarterPlayer.StarterCharacterScripts
  • etc
    Thanks for reading.

StarterCharacterScripts is used to give all players the same set of things. You can’t add to it for just one player.

So is there anyway to fix this?

What are you trying to index it for?

If its for Tools just use the Player’s player.StarterGear

It’s an ability for example like a fireball.

There’s a way to do most things! But StarterCharacterScripts is usually not the answer.

There are events like Player | Roblox Creator Documentation which let you detect when a player respawns. You could copy things into the character then if you like.

You could also change your design so that there’s just one script in the character that handles all the abilities, and just checks if the player is allowed to use them or not.

1 Like

Ok thank so I’m going to try adding a value if they can use it or not.

Sure you can do that. Just keep in mind that clients have near complete control over their own character, so you might wanna make sure it’s not too easy to abuse this.

1 Like