Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- this is not at all whats happening behind the scenes but this is just for the sake of example of you might understand that events just get called after actions
- local dummy = nil --reference dummby
- local function createCharacter(player)
- local newChar = dummy:Clone() -- basically what loadCharacter() does
- newChar.Name = player.Name
- -- apply description etc
- -- give networkownership etc
- newChar.Parent = workspace
- player.ChararacterAddedEvent:Fire(newChar) -- this is not a real property
- newChar.Humanoid.Died:Connect(function() -- replaces old char with a new char on death, prob how roblox would fire this event isach time the the humanoid health changes it checks if its zero/ lower if it is then it kills it and calls .Died:Fire(), as you see it never waits
- wait(game.Players.RespawnTime)
- createCharacter(player)
- end)
- end
- game.Players.PlayerAdded(createCharacter) -- calls when player initially joins
- -- as you can see its just actions after actions, this is not real code and will not work
Advertisement
Add Comment
Please, Sign In to add comment