01 | local plr = game:GetService( "Players" ) |
02 |
03 |
04 | game.Players.PlayerAdded:Connect( function (plr) |
05 | local character = game.Workspace:WaitForChild(plr.Name) |
06 | if plr.Name = = "aprilsfooled" then |
07 | print (plr.Name .. " , has spawned" ) |
08 | local t = game.ServerStorage.Tools.Keycard:Clone() |
09 | t.Parent = plr.Backpack |
10 |
11 | end |
12 | end ) |
CharacterAdded I believe fires on a respawn and on join.
Ex.
1 | local Name = "aprilsfooled" |
2 |
3 | game.Players [ Name ] .CharacterAdded:Connect( function () |
4 | -- your code -- |
5 | end ) |
01 | local Players = game:GetService( "Players" ) |
02 |
03 | game.Players.PlayerAdded:Connect( function (plr) |
04 |
05 | plr.CharacterAdded:Connect( function (character) |
06 |
07 | if plr.Name = = "yourinvolvedplayer" then |
08 |
09 | print (plr.Name .. " , has spawned" ) |
10 |
11 | local t = game.ServerStorage.Tools.Keycard:Clone() |
12 | t.Parent = plr.Backpack |
13 | end |
14 | end ) |
15 |
16 | end ) |
I got it fixed. Thanks for the help though.