My script doesn't work

  1. What do you want to achieve?

i made made animation (2 vers with motion and motionless)and i want to make character move as animation goes(i picked motionless animation) relaying on task.delay

  1. What is the issue?

i make task.delay(time, function()
bv.Velocity = c.PrimaryPart.CFrame.LookVector * – numbers
first function script reads but every other function it doesn’t(i move only once)
no errors at all

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes,small amount of people make complex animation in game
    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!
    my code:(its not all code,but it is related)
	if #hits <= 99 then
		local bv = Instance.new("BodyVelocity",char.PrimaryPart)
		bv.MaxForce = Vector3.new(99999,0,99999)
		bv.Name = "v"
		bv.P = 10
		game.Debris:AddItem(bv,.2)
			if comboN == 1 then
				
					bv.Velocity = c.PrimaryPart.CFrame.LookVector * 1.2075 -- 8
					 task.delay(0.2,function()
						bv.Velocity = c.PrimaryPart.CFrame.LookVector * 1.35125 -- 20
						task.delay(0.07,function()
							bv.Velocity = c.PrimaryPart.CFrame.LookVector * 1.84 -- 24
							task.delay(0.07,function()
								bv.Velocity = c.PrimaryPart.CFrame.LookVector * 1.8745 -- 28
								task.delay(0.07,function()
									bv.Velocity = c.PrimaryPart.CFrame.LookVector * 1.15 -- 32
									task.delay(0.07,function()
										bv.Velocity = c.PrimaryPart.CFrame.LookVector * 2.185 -- 36
										task.delay(0.07,function()
											bv.Velocity = c.PrimaryPart.CFrame.LookVector * 2.875 -- 40
											task.delay(0.07,function()
												bv.Velocity = c.PrimaryPart.CFrame.LookVector * 6.9 -- 44(nice)
												task.delay(0.07,function()
													bv.Velocity = c.PrimaryPart.CFrame.LookVector * 2.415 -- 48
												end)
											end)
										end)
									end)
								end)
								end)
						end)
				end)
				end
		end
	end)```

```lua
-- This is an example Lua code block

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.

hm, are you trying to make a combo system or something with this?

yes ,and it will move character progressively while animation playing(i want character to move to have more visual power in slashes)

ah, so you want the character to move its humanoidrootpart as the animation plays?

yes i want to move player while animation playing(there are many lines because animation (that have motion)moves character progressively. For example 8 frame move him 0.5 stud, 12 frame 0.3 studs 16 frame 1 stud, and so on(not immediately)

Desktop 2023.01.13 - 14.17.26.02.DVR 00_00_00-00_00_30

i am only scripting first hit at the moment

Maybe you can add animation markers, and when you hit those markers you can move the player

2 Likes

i dont have problems with it , i want to ask how to move player with time delay(sorry for being not exact) but i will try, guys sorry gtg

btw you can read more about animation markers (or animation events) here:

it basically allows you to run code at a certain point during the animation.

1 Like

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