The intention of the script is to do a beam from the hand. But I've been stuck at this wall for 6 hours now and I need help. By Resizing it I want the beam to shoot one way and I figure I just got to divide the CFrame of the size adjusted by 2. But for some reason the CFrame does not change while Tweening. Please help, Thank you
if AssetNeeded == "FireBeam" then--FireBall local char = Player.Character local FireBeam = game.ServerStorage.AbilityAsset.FireBeam:Clone() FireBeam.Parent = workspace local BeamHandle1 = FireBeam.FireBeamHandle1 local BeamHandle2 = FireBeam.FireBeamHandle2 local Beam1 = FireBeam.FireBeam1 local Beam2 = FireBeam.FireBeam2 local BeamEnd1 = FireBeam.FireBeamEnd1 local BeamEnd2 = FireBeam.FireBeamEnd2 --WELD-- local LeftHand = char.LeftHand BeamHandle1.CFrame = LeftHand.CFrame * CFrame.new(0,-0.7,0) * CFrame.Angles(0,0,math.rad(90)) local weld = Instance.new("WeldConstraint") weld.Part0 = BeamHandle1 weld.Part1 = LeftHand weld.Parent = BeamHandle1 local LeftHand = char.LeftHand BeamHandle2.CFrame = LeftHand.CFrame * CFrame.new(0,-0.5,0) * CFrame.Angles(0,0,math.rad(-90)) local weld = Instance.new("WeldConstraint") weld.Part0 = BeamHandle2 weld.Part1 = LeftHand weld.Parent = BeamHandle2 local LeftHand = char.LeftHand Beam1.CFrame = LeftHand.CFrame * CFrame.new(0,-1,0) * CFrame.Angles(0,0,math.rad(-90)) local weld = Instance.new("WeldConstraint") weld.Part0 = Beam1 weld.Part1 = LeftHand weld.Parent = Beam1 local LeftHand = char.LeftHand Beam2.CFrame = LeftHand.CFrame * CFrame.new(0,-1,0) * CFrame.Angles(0,0,math.rad(-90)) local weld = Instance.new("WeldConstraint") weld.Part0 = Beam2 weld.Part1 = LeftHand weld.Parent = Beam2 --TWEEN-- local Tween1 = getTween(BeamHandle1,2,'Sine','Out',100, {Size = Vector3.new(1, 1.5, 1.5);CFrame = BeamHandle1.CFrame * CFrame.Angles(math.rad(-180,180),0,0) } ) local Tween2 = getTween(BeamHandle2,2,'Sine','Out',100, {Size = Vector3.new(1.5, 1.8, 1.8);CFrame = BeamHandle2.CFrame * CFrame.Angles(math.rad(-180,180),0,0) } ) local Tween3 = getTween(Beam1,2,'Sine','Out',100, {Size = Vector3.new(34,0.7,0.7);CFrame = Beam1.CFrame * CFrame.new (34/2,0,0)} ) local Tween4 = getTween(Beam2,2,'Sine','Out',100, {Size = Vector3.new(34,0.85,0.85);CFrame = Beam2.CFrame * CFrame.new (34/2,0,0)} ) Tween1:play() Tween2:play() Tween3:play() Tween4:play()
How it's supposed to look: https://gyazo.com/8e8737ba966774e74fb80aaf7701d6fb How it looks: https://gyazo.com/d6e2107abd90fbbc64d189857080ee55