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

Change the walkspeed depending on number for ex :ws 50, :ws 30?

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.

2 comments

0

Not a request forum, look it up and try it out yourself first.

0

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.

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.