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

Why is my animation loading in ROBLOX Studio but not ROBLOX itself?

Asked by 5 years ago

This script works in ROBLOX Studio, but not in ROBLOX itself.

wait()
using=false
player=game.Players.LocalPlayer
mouse = player:GetMouse()
eq = false
h = player.Character:WaitForChild("Humanoid")

Sweep = h:LoadAnimation(script.Parent.Sweep)

script.Parent.Equipped:connect(function()
eq=true
end)

script.Parent.Unequipped:connect(function()
eq=false
end)

mouse.Button1Down:connect(function()
if eq==true and using==false then
using=true
Sweep:Play()
script.Parent.Dust.ParticleEmitter.Enabled=true
wait(.75)
script.Parent.Dust.ParticleEmitter.Enabled=false
wait(1)
using=false
end
end)

Any help on why this error is occurring?

Answer this question