0

# how to make it so that if the player joined the game his speed and jump is 100?

this code isnt working local SpeedGiver = game.Workspace

i just dont understant what parent does the character have

0
you gotta define the player in the parameters acediamondn123 141 — 1mo
0
it still doesnt work game.Players.PlayerAdded:Connect(function(player) game.Workspace.Character.Humanoid.WalkSpeed = 100 game.Workspace.Character.Humanoid.JumpPower = 100 end) crushersxd 15 — 1mo
0
That still won't work, because you're defying player for a reason. You need to use that player argument for Character. 2_MMZ 986 — 1mo

0
7777ert 49
1 month ago
Edited 1 month ago

You got to tell the script which player’s character is it! To do this, you can try the script below:

game.Players.PlayerAdded:Connect(player)
player.character.Humanoid.WalkSpeed = 100
player.character.Humanoid.JumpPower = 100
end


In the script, player is a parameter of the event PlayerAdded. It will tell the server ‘who’ joined the game. Then, after knowing who joined, the script will find the player’s character and change his walkpower and jumppower to 100

Hope I make it clear :D

0
Btw it is better to do indentation in the script, I’m on mobile so I can’t press tab sorry :( 7777ert 49 — 1mo
0

put a script inside ServerScriptService then the code should look like this:

game.Players.PlayerAdded:Connect(function(player) -- gets the player when they join

local humanoid = character:WaitForChild("Humanoid") -- define humaoid
humaoid.WalkSpeed = 200 --  change it, walkspeed :)
humanoid.JumpPower = 200 -- change it, jumppower
end)
end)


hope i helped LOLLOLOLO

0

Depending on whether or not you want to achieve this through a script, this can vary. For a less complex version, you would just go into starterCharacterScritpts, and change the walk speed/jump power. Although, I recommend doing this through script, because you can later change or adjust the speed, and or jump power. Put this script into the server script service, as a script:

game.Players.PlayersAdded:Connect(function(player)
local hum = char:WaitForChild("Humanoid")
local w = hum.WalkSpeed
local j = hum.JumpPower
w = nil -- put your walkspeed here (default is 16)
j = nil -- put your jump power here
end)
end)


This should work just fine, and if you want to tie this to a remote event, or a touched function, your free to ask

0
Aeventy 20
1 month ago

Select StarterPlayer in the explorer.

Change CharacterWalkSpeed to 100, and CharacterJumpPower to 100.