✓ Accepted answer
The issue with your script, is that you are cloning the tool only to the Backpack. Before I answer your question, next time you ask a question here, please make sure to be more descriptive with your questions, and, use code blocks to show your code. You can do that by pressing the Lua Icon above the description box and paste your code between the 2 lines of ~.
So, with your code, I was unsure what script you had, or where you had it, so, I have got a serverscript in ServerScriptService. This way, we also have access to ServerStorage, which is a very good way to store Tools and prevent exploits from getting them. What I have done with your script is that I changed the paths from ReplicatedStorage to ServerStorage, and also added the tool to StarterGear. This makes sure that even if you die, you will respawn with it!
local ServerStorage = game:GetService("ServerStorage")
local Players = game:GetService("Players")
local MarketPlaceService = game:GetService("MarketplaceService")
Players.PlayerAdded:Connect(function(Player)
if MarketPlaceService:UserOwnsGamePassAsync(Player.UserId, 13440876) then
local Tool = ServerStorage["Grenade Launcher"]:Clone()
Tool.Parent = Player.Backpack
Tool.Parent = Player.StarterGear
print("Gave the item to "..Player.Name)
end
end)
Keep in Mind: This issue may also be caused by the fact that your place is not published! Please make sure your place is up to date with your updates and make sure everything is published.
I hope this helped you, and if it has, then feel free to Accept the answer, this gives both of us reputation!
3 comments
and tell me if you get any errors, you can open the console in game by pressing F9
it is a server script, but whenever i move it to ServerScriptService the script doesnt even work. Team create is off
I went inside the game and i wasnt getting any error message, It was printing saying that it gave me the Weapon too