Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to I use a textbox to change the humanoid walkspeed?

Asked by 6 years ago

I have tried to use this script in my gui but I will not work

speed = game.StarterGui.Fresh_Apple.FreshAppleFrame.SpeedChanger

while true do
    game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = speed.Text
    wait(0.1)
end

can you help me?

1 answer

Log in to vote
0
Answered by 6 years ago
--LocalScript
local ply = game.Players.LocalPlayer
local cha = ply.Character
local hum = cha:FindFirstChild("Humanoid")
local textbox = script.Parent

local run = true

while run do
    pcall(function()
        local num = tonumber(textbox.Text)
        hum.WalkSpeed = num
    end)
    wait(0.1)
end
0
Thanks! Now I can work on my gui more! jhoncena10024 0 — 6y
Ad

Answer this question