The BodyPosition is weird

im making the combat system
how to fix this help

Iā€™m guessing its because the VFX is being replicated faster than the dash in the server, could you send us the script?

local Anim = Hum:LoadAnimation(ServerFiles.Anim["AChara"]["L1"--[[..Data.Combo.Value--]] ])
				Anim:Play()
				local LMBDisable = Instance.new("BoolValue", Char)
				LMBDisable.Name = "LMBDisable"
				game.Debris:AddItem(LMBDisable, 1)
				
				Anim.KeyframeReached:Once(function(name)
					if name == "Attack" then
						if Root:FindFirstChildOfClass("BodyPosition") then
							Root:FindFirstChildOfClass("BodyPosition"):Destroy()
						end
						local BP = Instance.new("BodyPosition", Root)
						BP.MaxForce = Vector3.new(500000, 0, 500000)
						BP.P = 999
						BP.D = 250
						BP.Position = Root.Position + Root.CFrame.LookVector * 10
						game.Debris:AddItem(BP, .2)
						
						local SlashS = ServerFiles.Sound.Slash:Clone()
						SlashS.Parent = Root
						SlashS:Play()
						SlashS.TimePosition = .36
						game.Debris:AddItem(SlashS, 1)
						
						task.delay(.2, function() LMBDisable:Destroy() task.wait(.065) end)
						local Step = ServerFiles.Effect.Footstep.Dash:Clone()
						Step.Parent = Root
						Step.a:Emit(9)
						game.Debris:AddItem(Step, 1.15)
						
						local Effect = ServerFiles.Effect.Speed:Clone()
						Effect.Parent = workspace.File.Effect
						Effect.CFrame = Root.CFrame
						game.Debris:AddItem(Effect, Effect.Life.Value)
						
						task.delay(.1 ,function()
							Effect.Anchored = true
							Effect.CanCollide = false
						end)

It could be because BodyPosition is deprecated and should not be used for newer work. It could cause issues. You should try using AlignOrientation instead.

1 Like