GreenPuddle.CFrame = CFrame.new(RaycastResults.Position, RaycastResults.Position + RaycastResults.Normal)
The .Normal seems to be backwards and I don’t know how to inverse it. Calling :Inverse() on the whole CFrame makes it teleport to a random position.
I’m trying to have the green toxic puddle stick to the surface of rotated objects.
Any help is appreciated!
heII_ish
(heII_ish)
#2
If the surface is correct and just the rotation of the puddle is wrong, you can rotate the puddle by 90 degrees with CFrame.Angles
GreenPuddle.CFrame = CFrame.new(RaycastResults.Position, RaycastResults.Position + RaycastResults.Normal) * CFrame.Angles(0, 0, math.rad(90))
CFrame.Angles(0, 0, math.rad(90))
has to be changed to CFrame.Angles(math.rad(90), 0, 0)
. (In my script atleast)
So happy this was easy math instead of some long equation. Thank you!