Making a realistic lightsaber effect

Hello. I am trying to get the effect of a lightsaber. I tried using particle emitters, that did not work. I decided just to use a part that has neon and forfield materials. I want to have an ignition, so when I hit the key “Q” the lightsaber blade/beam does the thing it does in the movies…Pops up from the bottom to the top. I tried using this script:

local part = game.Workspace.Part -- Replace with the name of your part
local numSegments = 10
local segmentHeight = part.Size.Y / numSegments
local waitTime = 0.1

for i = 1, numSegments do
    local transparency = (i * segmentHeight) / part.Size.Y -- Calculate transparency based on how much of the total distance each segment has covered
    part.Transparency = transparency -- Set transparency of part
    wait(waitTime) -- Wait for a short period of time (you may need to adjust this value)
end

But that changes the WHOLE parts transparency and not segments at a time like I thought it would. I am not implementing the ignition yet, im more testing different ways. What am I doing wrong? How can I achieve this desired effect? Using TweenService?

FYI: This isnt actually the script I used, the script I used I just found in my toolbox for some reason and spiced it up. But this looks and does the exact same thing. I found this from some YT tutorial

1 Like

bump

30))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

they probably got the effect using Tweenservice to tween the size of the neon part up.

1 Like

I am asking how to do it…

30 min)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

1 Like

Q: “how to do it”
A: use tweenservice to tween the size of the Neon part out, people constantly ask how to use tweenservice even though there is a crazy amount of documentation on it already

all you need to do is simply take these resources and tween the size of the neon part up.

you would also need to tween the CFrame of the part to the center as the size expands, which should take some basic cframe math (I would use motor6d’s and tween C1)

1 Like

I said that because your answer was no help. I wanted to know if I should use tweening or not. Thanks for the help, I will now

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