im trying to make an emote dances remake game, but i cant! when i use this code made by someone on roblox studio, it doesnt work. this is the code: "enabled = false local Tool = script.Parent; local dancer = nil local player = game.Players.LocalPlayer
function onActivated()
--This will check if it is enabled and then either start dancing or stop dancing
if enabled == false then local humanoid = Tool.Parent:FindFirstChild("Humanoid") local torso = Tool.Parent:FindFirstChild("Torso")
dancer = humanoid:LoadAnimation(Tool.dance) Tool.DanceObject.Value = dancer dancer:Play() Tool.dancepart.Position = player.Character.Head.Position Tool.dancepart.SongLoop:Play() enabled = true speed = player.Character.Humanoid.WalkSpeed player.Character.Humanoid.WalkSpeed = 0 repeat wait(1) Tool.dancepart.Position = player.Character.Head.Position until enabled == false
else dancer:Stop() dancer:remove() Tool.dancepart.SongLoop:Stop() enabled = false player.Character.Humanoid.WalkSpeed = speed end end
function onUnequipped() dancer:Stop() dancer:remove() Tool.dancepart.SongLoop:Stop() enabled = false player.Character.Humanoid.WalkSpeed = speed end
Tool.Activated:connect(onActivated) Tool.Unequipped:connect(onUnequipped)"
(btw ik it looks weird but it starts at the first quotation mark and ends at the second quotation mark) when i try to use the dance tool, i hear the song but dont see my character dancing. help everything i try wont work.