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.")
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function() 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.")