I'm trying to make a hotel game. Ran into this glitch where the 'Staff Card' clones itself for some reason. I've looked everywhere in the game and I've yet to find the cause for it. Here's the script that gives the player the card. I would really appreciate it if someone found out. Thanks again!
game.Workspace.ChildAdded:connect(function(child)
if game.Players:GetPlayerFromCharacter(child) then
local player = game.Players:GetPlayerFromCharacter(child)
if player:GetRankInGroup(script.GroupID.Value) >= script.RankID.Value then
local ckey = game.ServerStorage["Staff Card"]:Clone()
ckey.Parent = player.Backpack
end
end
end)
print("The Staff Card has been added to your inventory.")

1 comment
The print is in the wrong place btw. It should be with the clone script, not outside of it