local function onCharacterAdded(character) if game.Workspace.Trueorno.Value >= 1 then local plr = game.Players:GetPlayerFromCharacter(character) local dagger = game.ReplicatedStorage.DaggerWood:Clone() dagger.Parent = plr.Backpack end end
This script is supposed to clone a Wooden Dagger into the player's backpack each time they respawn, but it never does. It's only supposed to happen when the lobby doesn't exist, which is why I made the if statement. There are no errors, so I'm not sure what's wrong with it. If you know what is, please help by posting a comment or answer. Thanks.
you never called the function that is why it is not running. Also, change it to this :
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function() if game.Workspace.Trueorno.Value >= 1 then local dagger = game.ReplicatedStorage.DaggerWood:Clone() dagger.Parent = plr.Backpack end end) end