Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Relative orientation from position?

Asked by
Plieax 66
5 years ago

Im attempting to make a lightning bolt and the first part goes up and to the right, at an orientation of 30,30,30 but the problem is i need to come out from the ball always up and to the right how would i do this?

what i want it to always look like: https://gyazo.com/b1c85759d639962cfee13b56fd194bfa

what it sometimes looks like: https://gyazo.com/6fffd79a701e6ee8fc92a416f3b17f1b

local first = Instance.new("Part",workspace)
first.Color = Color3.fromRGB(255, 255, 0)
first.Material = Enum.Material.Neon
first.Position = tool.Handle.Position
first.CanCollide = false
first.Orientation = Vector3.new(30,30,30)
first.Size = Vector3.new(.5,5,.5)
first.Anchored = true

1 answer

Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
5 years ago
first.CFrame = orb.CFrame * CFrame.Angles(30,30,30)
Ad

Answer this question