Script Help Needed

Im Working on a training simulator and this is a lift script when the player presses LMB plays animation but it doesn’t work, here is the script:

plr = game.Players.PlayerAdded:Wait()
char = plr.CharacterAdded:Wait()
liftanim = script.LiftAnim
tool = script.Parent
if tool.Parent == plr.Backpack then
local mse = plr:GetMouse()
tool.Equipped:Connect(function(mouse)
if mouse.Button1Down then
local anim = char.Humanoid:LoadAnimation(liftanim)
anim:Play()
end
end)
end

hello?? is There any help???

No one will respond if your code is not formatted correctly (This rule is written in terms of service)

what do u mean ? i dont understand

image
Instead of
image

If it’s written like this then it’s just barely readable

thank you i’l recreate another topic i appreciate u

1 Like