I am trying to make a script that gives a weapon only to me. It only hands me a weapon to a player that has my name. Here is the script:
function Added(plr)
wait(1)
if plr.Name == "EliteRayGawnX2" then
local Katana = script.Katana
local KatanaClone = Katana:Clone()
KatanaClone.Parent = plr.Backpack
end
end
game.Players.PlayerAdded:connect(Added)
It works as intended in studio tests. The weapon but when i actually go to play the game, it does not work. Is it a problem in the script? Or with Roblox?

2 comments
Show me your explorer please
ServerScriptService>Script>Katana