When the player types "/e dance3' I was expecting it to play one of my custom animations.
Heres the code
game.Players.PlayerAdded:connect(function(Plr) Plr.Chatted:connect(functiom(msg) if msg == "/e dance3" then A = Instance.new("Animation", Plr.Character) A.AnimationId = "www.roblox.com/Asset?ID=myidwillgohere" track = Plr.Character.Humanoid:LoadAnimation(A) track:Play() end end) end)
Getting error from "if"
Also how do I get the asset ID from a custom animation? Do I just use the one available on my profile? I cant find the asset URL anywhere.
Thanks.
You, on the ROBLOX site, have an URL like this:
http://www.roblox.com/Begging-to-god-item?id=216740791 - it's just an example
Then, collect the ID: on this case, is 216740791
Then, subtract one to it: 216740791 - 1 = 216740790
Then, put it on this string value:
Something.Texture = "rbxassetid://216740790"
Hope I helped!!! More info here
Line 2, "function
" is misspelled incorrectly.
Plr.Chatted:connect(functiom(msg)
That should fix the "if
" error