So I want to make my character tp around (360 degree) a part and my character look at the part and i'm quite confused about it because i don't know how to use cframe angles properly
CFrame method, teleport circle?
1 answer
{sorry if I didn't fully understand your problem}
It depends on which side are you going to that part (you may want to change X, Y or Z value) BTW if you want to rotate your character around that will be 180 degrees, not 360 (360 will be the same as 0/nothing)
anyways here's the script (get rid of debounce if not needed, tho it helps balancing some things)
local db = true
script.Parent.Touched:Connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
local rootPart = hit.Parent:FindFirstChild("HumanoidRootPart")
if human then
if db == true then
rootPart.CFrame = CFrame.new(rootPart.CFrame.X, rootPart.CFrame.Y, rootPart.CFrame.Z) CFrame.Angles(math.rad(180),0,0)
db = false
wait(1)
db = true
end
end
end)
CFrame.Angles() is what you need to use in order to rotate something, inside it just type the values you wanna change (either X, Y or Z) but it needs to be in radians, so if you wanna rotate something you're gonna type math.rad(and inside here - how many degrees you want the part to be rotated) for example math.rad(90). I'm horrible at explaining but I hope I helped you a little... LMAO
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Why don't you just change the camera to orbit around your part?