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.

11 comments
I don't want it to be PlayerAdded, as Character is different. It should be whenever the player respawns, and not joining.
I think the problem is that it always goes through the if statement.
ok, let me change this then
ok, let me change this then
Edited! should work now
Thanks! Honestly thought it wouldn't work, but it did after fixing an error (changed the last end to end) to close the function)
Thanks! Honestly thought it wouldn't work, but it did after fixing an error (changed the last end to end) to close the function)
Thanks! Honestly thought it wouldn't work, but it did after fixing an error (changed the last end to end) to close the function)
Thanks! Honestly thought it wouldn't work, but it did after fixing an error (changed the last end to end) to close the function)
ok, glad I could help
Not sure why that same comment got posted 4 times :/