#Welding
1 messages · Page 1 of 1 (latest)
** You are now Level 2! **
why are you doing this in a local script?
wait no
im stupid
i read it wrong mb
give me a moment to remember
its a server side script to handle the hit detection i can give the local script if needed
i swear ive done smth like this before
the C0 and C1 stuff confuses me
its ok i cant figure it out on my own and the documents arent helping 
so for C1 its the cframe of part1
u could do smth like CFrame.new(0,0,-5) or smth
to have the enemy be infront of the player
for C1?
oh
** You are now Level 5! **
would x,y,z stay like that or is it 0, 0, -5 also
you have to rotate it like 180 on one of the axis
to make them face the player correctly
actually i think you can do
weld.C1 = CFrame.new(0,0,-5)*Cframe.Angles(0,0,0)
you can change the -5 to whatever distance and for the CFrame.Angles you have to use math.rad(number)
for the axis that you're trying to rotate
for some reason instead of going 180 to face the enemy it goes diagonal
maybe the lookat is messing with it
hm
thats odd
This is what my script looks like rn
grab.OnServerEvent:Connect(function(plr, enemy)
local plrhrp = plr.Character:WaitForChild("HumanoidRootPart")
local enemyhrp = enemy:WaitForChild("HumanoidRootPart")
enemyhrp.CFrame = CFrame.lookAt(enemyhrp.Position, plrhrp.Position)
local weld = Instance.new("Weld")
weld.Part0 = plrhrp
weld.Part1 = enemyhrp
weld.Parent = enemyhrp
weld.C0 = CFrame.new()
weld.C1 = CFrame.new(0,0,-5)* CFrame.Angles(0,180,0)
end)
maybe change the parent to be the plrs hrp?
idk if that will affect anything
but
we gotta try everything yk
Wait i think it worked
rlly?
Yea, only that they can move around with shiftlock but that should be manageable
o
Ty tho
Yup it worked ty very much