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

How can I change a player's walkspeed when they say something in chat?

I have scripted the word, but it wont change the player's speed. The script is here:

local GroupId = 8983096 local MinimumRank = 5

local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/Asset?ID=6484830111"

game.Players.PlayerAdded:Connect(function(Player) Player.Chatted:connect(function(Message) if Player:GetRankInGroup(GroupId) >= MinimumRank then if Message == "Speed" then local animTrack = Player.Character.Humanoid:LoadAnimation(animation) animTrack:Play()

	   end 
    end
end)

end)

local GroupId = 8983096 local MinimumRank = 5 local plr = game.Players.LocalPlayer

game.Players.PlayerAdded:Connect(function(Player) Player.Chatted:Connect(function(Message) if Player:GetRankInGroup(GroupId) >= MinimumRank then if Message == "Speed" then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 end end end) end)

1 answer

replace

game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25

with

Player.Character.Humanoid.WalkSpeed = 25

1 comment

0

this didn't work sadly

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