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

How To Change walkspeed with textbox?

Hello, How do I change the walkspeed with textbox when the button is clicked i tried this but it says that attempt to index field 'WalkSpeed' (a number value)

Here is my script:

local player = script.Parent.Parent.Parent.Parent.Parent
local Background = script.Parent.Parent
local WalkSumbit = script.Parent

WalkSumbit.MouseButton1Click:connect(function()
	player.Character.Humanoid.WalkSpeed.Value = tostring(Background.WalkBox.Text)
end)

2 comments

0

try taking out .value on line 6. I believe walkspeed is a property in iteself. Walkspeed.Value would be like saying Text.Value instead of just setting Text if that makes sense.

0

still says that error :(

3 answers

i found the anwser i used the server script not a local script!

See if taking Value out of line six fixes it.

2 comments

0

it works but when i type in text box 20 it sets to 0

0

Alright so you need to make it so it reads the text inside the Textbox.

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