local player = game.Players.LocalPlayer
local character = player.Character or
player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local wins = player.leaderstats.Wins
local value = 10
wins.Changed:Connect(function()
humanoid.WalkSpeed = humanoid.WalkSpeed + value
end)
This is the code that I have written for the speed Increase and I want to add a speed limit. Please tell
Try this
local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local wins = player.leaderstats.Wins local value = 10 local limit = 100 wins:GetPropertyChangedSignal('Value'):Connect(function() if value < limit then humanoid.WalkSpeed = humanoid.WalkSpeed + value else humanoid.WalkSpeed = 16 + limit -- Fix the WalkSpeed at the limit. end end)
Hope this help, to more questions put bellow in commentaries.