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

WalkSpeed With A TextBox?

I would make a button that gives you the walkspeed you entered in a textbox in a GUI. But i got errors and i don't find any post with the answer. Please help me! This is my current script (Its a LocalScript):

local plr = game.Players.LocalPlayer.Character.Humanoid
local numb = script.Parent.Parent.WsNumber.Text

script.Parent.MouseButton1Click:Connect(function()
plr.WalkSpeed = numb
end)

1 comment

0

You can use tonumber in the script, because the WsNumber is a string, so maybe use tonumber.. The answer is already down there.

1 answer

change:

local numb = script.Parent.Parent.WsNumber.Text

to:

local numb = tonumber(script.Parent.Parent.WsNumber.Text)

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