local M1cooldown = true
game.ReplicatedStorage.Attack.OnServerEvent:Connect(function(plr,key)
if key == "M1" and M1cooldown == true then
M1cooldown = false
local hitbox = game.ServerStorage.Hitboxes.SwordSlash:Clone()
hitbox.Parent = game.Workspace
hitbox.CFrame = plr.Character.HumanoidRootPart.CFrame + plr.Character.HumanoidRootPart.CFrame.LookVector * 2
local weld = Instance.new("WeldConstraint")
weld.Parent = hitbox
weld.Part0 = plr.Character.HumanoidRootPart
weld.Part1 = hitbox
local anim = plr.Character.Humanoid.Animator:LoadAnimation(plr.Character.Humanoid.Animator.Slash)
anim.Priority = Enum.AnimationPriority.Action
anim:Play()
task.wait(0.5)
weld:Destroy()
hitbox:Destroy()
M1cooldown = true
end
end)
This keeps on happening, tried switching from welds to weldconstraints, same issue, setting C1 and C0 just misalignes the collision, what way can i make it not teleport like that?
Fixed the teleporting issue by putting the cloning stuff in the client script and replacing serverstorage with replicatedstorage, however now i’ve run into the problem of it completely removing any and all velocity you had, is there a fix for that also?