Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago

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

Log in to vote
0
Answered by 3 years ago

replace

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

with

Player.Character.Humanoid.WalkSpeed = 25
0
this didn't work sadly AdSomnum 20 — 3y
Ad

Answer this question