So when the player clicks the item, they get a 'Bear' of which is in Replicated Storage, and it's then added to the player's startergear. When I click and reset, I've not been given the item. Am I missing some code? Did I mistype anything? I also need it so the player can only get the item once and it- (extra; disappears?) Please help me, I'm a little stuck ;-;
script.Parent.ClickDetector.MouseClick:connect(function(player) local plr = game.Players:findFirstChild(player.Name) game.ReplicatedStorage.Bear:Clone().Parent = player.StarterGear wait (3) end
Adding the tool to the player's startergear will make the player get the item every time they respawn. You should replace player.StarterGear with player.Backpack
game.ReplicatedStorage.Bear:Clone().Parent = player.Backpack
For the gear, it would be Backpack and not StarterGear (if you wanted the gear to not be in the player's backpack every time the player respawn)
I would also change the find first child thing.
Although I haven't tested the script yet, I am certain that it works.
script.Parent.ClickDetector.MouseClick:connect(function(player) local plr = game.Players:GetPlayerFromCharacter(player.Parent) game.ReplicatedStorage.Bear:Clone().Parent = player.Backpack wait (3) end
Ok so there are stuff to fix and also add, and i will also help you with getting the tool once so i really hope my scripts works and helps you.
local db = false script.Parent.ClickDetector.MouseClick:Connect(function(player) if not db then db = true local plr = game.Players:GetPlayerFromCharacter(player.Parent) local bear = game.ReplicatedStorage.Bear bear:Clone().Parent = player.Backpack wait(9^9^9) --This will wait inf so the player wont get the tool again :) db = false end end)