Hey!
Looks like you're on the right track so far. If you want to have somebody spawn with a tool, you can just add the tool to said players' starter gear by parenting it. An example is shown below...
local tool = game.ServerStorage.Tool
tool:Clone().Parent = player.StarterGear
If this isn't enough for you and you want to do more before giving the tool, you can give it to them when they spawn with the CharacterAdded event. This will fire off whenever, well, the character is added. I'll show a code example for that below as well.
local Players = game:GetService("Players")
Players.PlayerAdded:Connect (function(plr)
plr.CharacterAdded:Connect (function(character)
local tool = game.ServerStorage.Tool
tool:Clone().Parent = player.Backpack
end)
end)
If you have any additional questions, feel free to ask.
If this answer helped, please remember to accept it! :)
2 comments
Thank you for the help but I figured out the problem that I'm having and it's because I can't add a gear to StarterGear via LocalScript. How do I get around this because the code is in a GUI?
You can use a RemoteEvent to tell the server to add it for you. @Michael_TheCreator