Recently, I've been trying to find a way to make a script that gives the player a item out of the ServerStorage. I've tried my own scripts and they haven't helped. I've even looked on the web and the toolbox. Yet, none work. Does anyone know a script that is currently working?
I need it so the item it kept forever after they are awarded the badge.
Here is the script I used too, I think I might has typed it all wrong but I'm not the best at scripting.
badgeid = 2124479032 location = game.ServerStorage tool = {"Galaxy Radio"} game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) if game:GetService("BadgeService"):UserHasBadge(p.userId, badgeid) then for i,v in pairs(tool) do local clone = location:WaitForChild(v):Clone() clone.Parent = p.Backpack end end end) end)
No block touch is active during this as the badge is awarded after staying in the game for an hour.
This may not work, but hopefully you'll get a gist of what I mean.
badgeid = 2124479032 radiolocation = game.ServerStorage.GalaxyRadio game.Players.PlayerAdded.connect(function(p) p.CharacterAdded:connect(function(c) if game:GetService("BadgeService"):UserHasBadge(p.userId, badgeid) then for i,v in pairs(tool) do local clone = radiolocation:WaitForChild(v):Clone() clone.Parent = p.Backpack end
-In your ServerStorage, make sure to change it to GalaxyRadio or something without a space or else line 2 won't work
-And btw this isn't meant to work, I was basically rewriting your script and giving you an idea of what it could look like :/
Please provide a script so we can help you. If there is a block touch function that gives the badge then make it so when you touch the block it will give the tool.