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

This chatted/animation script won't work?

Asked by 10 years ago

This script is in Workspace:

game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(msg)
        if msg:sub(1, 13) == "Bakudo #1 Sai)" then
            Run = game:GetService("RunService")
            RightShoulder = player.Character.Torso["Right Shoulder"]
            for i = 1, 1 do
                for i = 1, 12 do
                    RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0.16)
                    RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0.1, 0)
                    Run.Stepped:wait(0.01)
                end
            end
        end
    end)
end)

If you say Bakudo #1 Sai then an animation happens. But it doesn't work.

0
For line 3, you coded some things wrong, it probly should be 'if msg:lower() == "bakudo #1 sai" then', the error was, to me, the ':sub()', and you added a ')' after 'Sai'. Hope this helped! TheeDeathCaster 2368 — 10y
0
I believe you could just do 'msg = "Bakudo #1 Sai)' TheStudentPilot 75 — 10y
0
Sorry I missed that mistake. This is my first time ever forgetting something in a string. BosswalrusTheCoder 88 — 10y

Answer this question