Hello, I am working on making a dabbing script in my game and I want it to activate through "/e dab. It isn't working and I'm not sure why. It is located in Starter Player Scripts and it's a local script.
local animation = Instance.new("Animation") animation.AnimationId = "rbxassetid://636749560" local animtrack = nil local canplay = true function processCommand(speaker, message) if message == "/e dab" then if canplay then canplay = false local Cname = speaker.Name local character = game.Workspace.Cname animtrack = character.Humanoid:LoadAnimation(animation) animtrack:Play() end end end
Any help is appreciated.
You didn't show the rest of your code but assuming you use a simple .Chatted connection, the function parameters are actually (message,recipient) in that order.
Make sure your AnimationId is correct. If not it should warn you in the output.
Also local character = game.Workspace.Cname
is bad practice. You can simply use game.Players.LocalPlayer.Character
to get the character :)