I have a issue with lightsaber blade beam It suppose to move the beam attachment up when “Burn” is enabled but if it not enabled it go down to original position. (It suppose not use touched)
Here a code
local tweenService = game:GetService("TweenService")
local Users=game:GetService("Players")
local User=script.Parent.Parent.Parent
local Tool=script.Parent
local BLADE = Tool:WaitForChild("toolModel"):WaitForChild("B")
local Enabler = BLADE:WaitForChild("Burn")
local beam = BLADE:WaitForChild("beamattachment")
local tweeningInformation = TweenInfo.new(
0.25,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0.5
)
local up = {CFrame = CFrame.new(0, 2.75, 0)};
local down = {CFrame = CFrame.new(0, -2.45, 0)}
local Tween1 = tweenService:Create(beam,tweeningInformation,up)
local Tween2 = tweenService:Create(beam,tweeningInformation,down)
local function bladeup()
if(Enabler.Value)then
Tween1:Play()
end
end
local function bladedown()
if(Enabler.Value)then
Tween2:Play()
end
end
BLADE.Touched:Connect(bladeup)
BLADE.TouchEnded:Connect(bladedown)
Here you can see what the issue in action.
Is there way to fix this issue?