Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

--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

1 comment

0

Thanks! Now I can work on my gui more!

This discussion is preserved as it was. New answers, comments, and votes are closed.