Attempting to play Animation

You can write your topic however you want, but you need to answer these questions:

  1. I want to make an animation where the roblox character holds a position like the force. Keep it simple and clear!

  2. It does not go high enough. Include screenshots / videos if possible!
    What the animation is supposed to look like: (Its supposed to freeze at that last frame.


    What the animation looks like:

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local player = game:GetService("Players").LocalPlayer
local forcelocked = nil
local mouse = player:GetMouse()
local hum = player.Character:WaitForChild("Humanoid")
local a = Instance.new("Animation")
a.AnimationId = "rbxassetid://11638837426"
local anim = hum:WaitForChild("Animator"):LoadAnimation(a)
local UserInputService = game:GetService("UserInputService")
anim:GetMarkerReachedSignal("ArmRisen"):Connect(function()
	anim:AdjustSpeed(1)
end)
if player:GetRankInGroup(16281209) >= 253 then
UserInputService.InputEnded:Connect(function(input,gameprocessed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		if forcelocked ~= nil then
				forcelocked = nil
				anim:AdjustSpeed(1)
			return
		end
		pcall(function()
			if mouse.Target.Parent:FindFirstChild("Humanoid") then
					print("locked player in")
					anim:Play()
				forcelocked = mouse.Target.Parent
			end
		end)
	end
end)
UserInputService.InputChanged:Connect(function(input,gameprocessed)
	if input.UserInputType == Enum.UserInputType.MouseMovement then
		if forcelocked ~= nil then
			local ray = workspace.CurrentCamera:ViewportPointToRay(mouse.X, mouse.Y)
			game.ReplicatedStorage.Force:FireServer(forcelocked,ray)
		end
		pcall(function()
			if mouse.Target.Parent:FindFirstChild("Humanoid") == nil then 
				if mouse.Target and mouse.Target.Parent then
					--print("not found")
					--print(mouse.Target.Parent)
				end
			end 
			if mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil then
				--print("I guess i found a humanoid?")
				end
			end)
		end	
	end)
end

I honestly have no clue why this is happening, please help!

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Try setting the AnimationPriority to Action4

Thanks! Just had to add a keyframe more for going down.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.