I have no idea what I am doing and what I should do, when player types :ws 60 for example, the walkspeed goes to 60, if the player tpyes :ws 20 then it goes to 20.
COMMUNITY QUESTION
Change the walkspeed depending on number for ex :ws 50, :ws 30?
1 answer
local Players=game:GetService"Players"
local function admincmds(player,msg)
msg=string.split(msg," ")
local cmd,ws=msg[1],msg[2]
ws=ws and tonumber(ws)
if cmd==":ws" and ws then
local h=player.Character;h=h and h:FindFirstChildOfClass"Humanoid"
h.WalkSpeed=ws
end
end
local function onPlayerAdded(player)
player.Chatted:Connect(function(t)
admincmds(player,t)
end)
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _,v in ipairs(Players:GetPlayers())do onPlayerAdded(v)end
1 comment
1
your script is so messy
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Not a request forum, look it up and try it out yourself first.
If you have no idea what to do. I recommend looking up the Developer Wiki and learn the things that are relevant to your script.