So I got a punch script and everything is working fine like animations, damage, particle emission, stuff like that but I want to make the person getting attacked to look at the attacker and then get sent back a bit, I know how to do the send back thing but I’m having trouble making the person look at the attacker
Right now I have code setup that brings up no problems but still doesn’t rotate the model of the person getting attacked. I read on other forums that to move models you should use :SetPrimaryPartCFrame so that is what I’m using right now.
I tried fixing it myself which is what I have done for everything so far and its been going well but right now every time I try to fix this it ends up with an error code
--Problem
local Attacker = character:GetPivot()
local EnemyCframe = hit.Parent:GetPrimaryPartCFrame()
hit.Parent:SetPrimaryPartCFrame(EnemyCframe * CFrame.lookAt(EnemyCframe.Position, Attacker.Position))