I want to have a script that, when a player joins, will increase their jumpheight by 1, every 10s in the game. I know it can use tick or wait, but how?
Correct me if I'm wrong but I believe the client has control over their character including WalkSpeed, JumpPower, Velocity, etc...
local player = game.Players.LocalPlayer while true do local char = player.Character or player.CharacterAdded:Wait() if char then local humanoid = char:FindFirstChild("Humanoid") if humanoid then humanoid.JumpPower = humanoid.JumpPower + 1 end end wait(10) end
Essentially we have created a loop that will run forever and will add 1 to their current jump power every 10 seconds I don't know why someone would want to do this exactly.
If the client doesn't have control over jump power you can essentially do the same thing on the server using remote events etc... Good luck!
local Player = game.Players.LocalPlayer spawn(function() while wait(10) do if Player.Character then local Humanoid = Player.Character:WaitForChild('Humanoid') Humanoid.JumpPower = Humanoid.JumpPower + 1 end end end)
i highly reccommend NOT doing this on a client, as a hacker/exploiter could easily change how high you can jump which is cheating. you should do it on the server instead
spawn(function() script.Name = "SV_JumpPower_Script" for _,player in ipairs(game.Players:GetPlayers()) do coroutine.resume(coroutine.create(function() -- Do this so it dosent stop at the first player while wait(10) do local Character = player.Character local Humanoid = Character:FindFirstChildOfClass("Humanoid") if Character and Humanoid then Humanoid.JumpPower = Humanoid.JumpPower + 1 end end end)) end end)