CharacterAdded (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "<code lua>" to "<SyntaxHighlight code="lua">" |
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>" |
||
Line 18: | Line 18: | ||
end) | end) | ||
end) | end) | ||
</ | </syntaxhighlight>}} | ||
[[Category:Events]] | [[Category:Events]] |
Revision as of 05:16, 27 April 2023
![]() | |
Description | Fired when a character spawns or respawns. |
---|---|
Member of: | Player |
Description
character will be a Model with Humanoid, all body parts, scripts, and joints. The model will be completely loaded when triggered by game.
Example
This code will make set every player's WalkSpeed to 25 everytime they respawn:
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character.Humanoid.WalkSpeed = 25
end)
end)