I made two animations for my sword. I want it to play one animation when mouse1down (plays the first animation which shows the sword slashing down). And when mouse1up it plays another animation, (the sword swinging up).
I also want the sword to be on the players shoulder when equipped, how would I do that, would I have to make another animation and just make it a loop or something?
Screenshot showing what I mean by on shoulder:
Though when I set up a code I get an error message:
Play is not a valid member of Animation “Animation” - Client - LocalScript:8
local InputService = game:GetService("UserInputService")
local InputType = Enum.UserInputType
InputService.InputBegan:connect(function(input)
if input.UserInputType == InputType.MouseButton1 then
local Slash = Instance.new("Animation")
Slash.AnimationId = "rbxassetid://7106774993"
Slash:Play()
end
end)
InputService.InputEnded:connect(function(input)
if input.UserInputType == InputType.MouseButton1 then
local Slash2 = Instance.new("Animation")
Slash2.AnimationId = "rbxassetid://7106778125"
Slash2:Play()
end
end)