Oh, I see. You want the character to be able of moving while also being forced to keep moving. Then you shouldn’t use bodymovers. I’m not quite sure on how to do that either.
I appreciate the help for the hitbox! For my slide, I’m trying to replicate something like this, https://www.youtube.com/watch?v=D40OoId4KTw&ab_channel=xSoloGuy&t=96 .
making them able to turn around, but they still have the velocity. I have timestamped the video. Also, I would like to activate the hitbox when a GetMarkerReachedSignal is reached, so it can hit up to 4 different times.
He isn’t using controls he is moving with shiftlock by rotating himself.
local BV = Instance.new("BodyVelocity",Player.Character.HumanoidRootPart)
BV.MaxForce = Vector3.new(1,1,1) * math.huge
BV.Velocity = Player.Character.HumanoidRootPart.CFrame.LookVector * 30
game.Debris:AddItem(BV,--The Time you want it to stay)
Whenever you shift lock it will move you towards this bodyvelocity.
Back, actually… don’t put a parent argument in the instance, it makes instances more delayed to appear, you should add a parent instead like “part.Parent = game.Workspace” instead of “Instance.new(“Part”, humanoidRootPart)”.
Anyways, my bad if i didn’t explain right, the P property of the body velocity is the power meaning since you put 0, it wouldn’t be powered enough to move the humanoid root part to where it’s supposed to be, the max force should be “0, math.huge, 0” so you can move horizontally but not vertically like in Rogue Lineage.
Also since the velocity i put wasn’t updated meaning it would only go to the original direction your humanoid root part was facing and not the current rotation your humanoid root part was, you should make a new thread local connection = spawn(function() then make the humanoid root part move by 0.5 studs or lesser but faster if you want it to be smoother on the Z direction (front) and put it in a loop until it gets disconnected.
Make sure that after around 3 seconds, you should disconnect it like connection:Disconnect() so it won’t happen infinitely.
I created an example in a model, you could use it for anything especially for the demon flip issue you have been having, make sure to edit some stuff so it doesn’t cause some problems.
Or if you’re too lazy to get the model, you can examine this code.
local part = script.Parent
local speed = .25
local canMove = true
local model = part.Parent
local target = model:WaitForChild("target")
local connection = spawn(function()
if canMove == true then
repeat
part.CFrame = CFrame.new(part.Position + part.CFrame.lookVector * speed)
part.CFrame = CFrame.new(part.Position, target.Position)
game:GetService("RunService").Heartbeat:Wait()
until canMove == false
end
end)
wait(10)
canMove = false
It doesn’t work, probably because I haven’t worked with CFrame much and I probably made a mistake somewhere.
local Player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
local character =Player.Character or Player.CharacterAdded:wait()
local Cooldown = Instance.new("BoolValue", game.Players.LocalPlayer)
Cooldown.Value = false
local Humanoid = character:WaitForChild("Humanoid")
local animator = Humanoid:FindFirstChildOfClass("Animator")
local Mouse = Player:GetMouse()
local m1 = Instance.new("Animation")
local Debounce = false
local DebounceTimer = 6
m1.AnimationId = "rbxassetid://5945839988"
local m2 = Instance.new("Animation")
m2.AnimationId = "rbxassetid://5949219966"
local animationTrack = animator:LoadAnimation(m2)
local lolanimation = animator:LoadAnimation(m1)
local canMove = false
local model = character.HumanoidRootPart
local speed = 8
local connection = spawn(function()
if canMove == true then
repeat
character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position + character.HumanoidRootPart.CFrame.lookVector * speed)
character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, character.HumanoidRootPart.Position)
game:GetService("RunService").Heartbeat:Wait()
until canMove == false
end
end)
wait(10)
canMove = false
local tool = script.Parent.Parent.DemonFlip
local mouse = Player:GetMouse()
mouse.Button1Down:Connect(function()
if character:FindFirstChild("DemonFlip") and Cooldown.Value == false then
Cooldown.Value = true
local sound = Instance.new("Sound", game.Players.LocalPlayer)
sound.SoundId = "rbxassetid://5355789788"
Humanoid.WalkSpeed = 0
sound:Play()
lolanimation:Play()
lolanimation.Stopped:wait()
BV:Destroy()
sound:Destroy()
end
end)
mouse.Button2Down:Connect(function()
if character:FindFirstChild("DemonFlip") and Cooldown.Value == false then
Cooldown.Value = true
local sound = Instance.new("Sound", game.Players.LocalPlayer)
sound.SoundId = "rbxassetid://5355789788"
local runtrack = Humanoid:LoadAnimation(m2)
sound:Play()
animationTrack:AdjustSpeed(1.5)
animationTrack:Play()
animationTrack:AdjustSpeed(1.5)
Humanoid.WalkSpeed = 0
canMove = true
spawn()
animationTrack.Stopped:wait()
canMove = false
animationTrack:AdjustSpeed(1)
Humanoid.WalkSpeed = 16
sound:Destroy()
end
end)
Cooldown.Changed:Connect(function()
if Cooldown.Value == true then
wait(5)
Cooldown.Value = false
end
end)
local Player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
local character =Player.Character or Player.CharacterAdded:wait()
local Cooldown = Instance.new("BoolValue", game.Players.LocalPlayer)
Cooldown.Value = false
local Humanoid = character:WaitForChild("Humanoid")
local animator = Humanoid:FindFirstChildOfClass("Animator")
local Mouse = Player:GetMouse()
local m1 = Instance.new("Animation")
local Debounce = false
local DebounceTimer = 6
m1.AnimationId = "rbxassetid://5945839988"
local m2 = Instance.new("Animation")
m2.AnimationId = "rbxassetid://5949219966"
local animationTrack = animator:LoadAnimation(m2)
local lolanimation = animator:LoadAnimation(m1)
local canMove = false
local model = character.HumanoidRootPart
local speed = 0.25
local connection = spawn(function()
if canMove == true then
repeat
character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position + character.HumanoidRootPart.CFrame.lookVector * speed)
character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, character.HumanoidRootPart.Position)
game:GetService("RunService").Heartbeat:Wait()
until canMove == false
end
end)
wait(10)
canMove = false
local tool = script.Parent.Parent.DemonFlip
local mouse = Player:GetMouse()
mouse.Button1Down:Connect(function()
if character:FindFirstChild("DemonFlip") and Cooldown.Value == false then
Cooldown.Value = true
local sound = Instance.new("Sound", game.Players.LocalPlayer)
sound.SoundId = "rbxassetid://5355789788"
Humanoid.WalkSpeed = 0
sound:Play()
lolanimation:Play()
canMove = true
local connection = spawn(function()
if canMove == true then
repeat
character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position + character.HumanoidRootPart.CFrame.lookVector * speed)
character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, character.HumanoidRootPart.Position)
game:GetService("RunService").Heartbeat:Wait()
until canMove == false
lolanimation.Stopped:wait()
Humanoid.WalkSpeed = 16
canMove = false
sound:Destroy()
end
end)
end
end)
mouse.Button2Down:Connect(function()
if character:FindFirstChild("DemonFlip") and Cooldown.Value == false then
Cooldown.Value = true
local sound = Instance.new("Sound", game.Players.LocalPlayer)
sound.SoundId = "rbxassetid://5355789788"
local runtrack = Humanoid:LoadAnimation(m2)
sound:Play()
animationTrack:AdjustSpeed(1.5)
animationTrack:Play()
animationTrack:AdjustSpeed(1.5)
Humanoid.WalkSpeed = 0
animationTrack.Stopped:wait()
animationTrack:AdjustSpeed(1)
Humanoid.WalkSpeed = 16
sound:Destroy()
end
end)
Cooldown.Changed:Connect(function()
if Cooldown.Value == true then
wait(5)
Cooldown.Value = false
end
end)