So, I'm trying to make a GUI that can alter the player's humanoid speed. I am using a Text Box to get the speed but it just says that I am comparing a number with a string. I'm quite confused on how to make this work! Any help is appreciated!
local player = game.Players.LocalPlayer.Name
script.Parent.submit.MouseButton1Click:Connect(function()
local body = game.Workspace:FindFirstChild(player)
local humanoid = body:FindFirstChild("Humanoid")
if script.Parent.enterSpeed.Text >= 30 then
if humanoid~=nil then
local speed = script.Parent.enterSpeed.Text
humanoid.WalkSpeed = speed
end
end
end)

1 comment
edit:- fixed link