When i load into game it sets walkspeed to 0 no matter what, how do i fix the issue?
function click () local spt = script.Parent.Text if spt ~= nil then script.Parent.TextV.Value = tonumber(spt) end local f = script.Parent.TextV.Value print("WalkSpeed Set to: " .. script.Parent.TextV.Value) script.Parent.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = f -- goes to LocalPlayers Walkspeed Value end script.Parent.Button.MouseButton1Click:Connect(click)
I can't see much of what's going on, but make sure that your "TextV" is a NumberValue, and not something different, you can also try converting to number right before changing the walkspeed if it's not a NumberValue.
function click () local spt = script.Parent.Text if spt ~= nil then script.Parent.TextV.Value = tonumber(spt) end local f = script.Parent.TextV.Value print("WalkSpeed Set to: " .. script.Parent.TextV.Value) script.Parent.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.WalkSpeed = tonumber(f) end script.Parent.Button.MouseButton1Click:Connect(click)