Need Help: Beam Direction Not Consistently Upward in Titan Shifting

Greeting Roblox developers!

Recently I have been working on a Titan Shifting for my game; however, I encountered a problem, which is the one giving title to this topic. Basically, it all works fine except for the fact that I have a part called “Tease” that is welded to the HumanoidRootPart of my character. This part contains another part called “Transform,” and inside this part, there is a beam. The problem is that I want the beam to always point upwards toward the sky, but if the character changes position (for example, if they fall face down), the beam ends up pointing to the right instead of upwards.

Working normally:
https://gyazo.com/ce03d0c464ff3110c66f05300eb13fed
Falling scenario:
https://gyazo.com/799b77d782080779753dd77a310a94da

What solutions have you tried?
I thought about changing the weld’s C1 orientation, but I’m still new to CFrames, and I haven’t really found a way to make it work.

I would say instead of relying c1’s orientation. Just directly set the beam’s CFrame based on the world’s upward direction: (the Vector3 direction (0, 1, 0)).

Ex

local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local HRP = character:WaitForChild("HumanoidRootPart")
local tease = HRP:WaitForChild("Tease")
local transform = tease:WaitForChild("Transform")
local beam = transform:WaitForChild("Beam") 

function SummonBeam()
    beam.CFrame = CFrame.new(beam.Position, beam.Position + Vector3.new(0, 1, 0))
end

game:GetService("RunService").Heartbeat:Connect(SummonBeam)
2 Likes

Thank you for answering! It fixed my problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.