Help me please i want to create a simulator
while wait(.5) do local children = game.Players:GetChildren() for i = 1, #children do if children[i].Character ~= nil then local hum = children[i].Character.Humanoid hum.JumpPower = children[i].leaderstats.Jump.Value/3.12 if game.Players.LocalPlayer.Character.Humanoid.Jump == true then game.Players.LocalPlayer.leaderstats.Jump.Value = game.Players.LocalPlayer.leaderstats.Jump.Value +1 end end end end
Don't use loop. Just detect when the player is jumping by using :GetPropertyChangedSignal()
use Players.PlayerAdded
to get player and use Player.CharacterAdded
to get player's character
game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) local hum = char.Humanoid hum:GetPropertyChangedSignal("Jump"):Connect(function() if hum.Jump == true then plr.leaderstats.Jump.Value = plr.leaderstats.Jump.Value +1 hum.JumpPower = plr.leaderstats.Jump.Value/3.12 end end) end) end)
Also change the script from LocalScript to ServerScript