Trying to make a Lightsaber TurnOn

  1. Introduction
  • Hi this is my first post after thinking about it for some time…

  • So I made a lightsaber tool that when you equip it… it runs a Function and plays a sound.

  1. What is the issue?
  • I am trying to change the Scale of the Beam Part so that it looks like its getting turned on…

  • I tried using TweenService, or just Vector3 but after I used it… the parts dissapeared…

  • I Looked around Some Forums and they led me to TweenService
    But It makes the parts dissapear just like how Vector3 did it and Nothing really happens…

  • This is the Quick and Dirty Code that I made:

tool = script.Parent
handle = tool:WaitForChild("Handle")

local TweenService = game:GetService("TweenService")


tool.Equipped:Connect(function()
	
	local lightSaberBeam0 = script.Parent.LightSaberModel.PlasmaBeam.Union
	local lightSaberBeam1 = script.Parent.LightSaberModel.PlasmaBeam.innerblade
	local lightSaberBeam2 = script.Parent.LightSaberModel.PlasmaBeam.bulb
	
	local lightSaberBeamSize0 = {}
	local lightSaberBeamSize1 = {}
	local lightSaberBeamSize2 = {}
	lightSaberBeamSize0.Size = Vector3.new"3.587, 0.136, 0.136"
	lightSaberBeamSize1.Size = Vector3.new"3.549, 0.134, 0.11"
	lightSaberBeamSize2.Size = Vector3.new"0.11, 0.11, 0.11"
	local TwInfo = TweenInfo.new(2)
	local Tween0 = TweenService:Create(lightSaberBeam0, TwInfo, lightSaberBeamSize0)
	local Tween1 = TweenService:Create(lightSaberBeam1, TwInfo, lightSaberBeamSize1)
	local Tween2 = TweenService:Create(lightSaberBeam2, TwInfo, lightSaberBeamSize2)
	
	lightSaberBeam0.Size = Vector3.new"0, 0.136, 0.136"
	lightSaberBeam1.Size = Vector3.new"0, 0.134, 0.11"
	lightSaberBeam2.Size = Vector3.new"0, 0.11, 0.11"
	
	print("the tool is Equiped")
	
	task.wait(0.1)
	local sound0 = workspace.Sounds.LightSaberTurnOn
	Tween0:Play()
	Tween1:Play()
	Tween2:Play()
	sound0:Play()
	
end)
  1. What solutions have you tried so far?
  • I have looked around the Forum and I can’t find any Solutions…
    if Possible I want to understand why its not working so that I can problem solve it on my own next time…

  • I also Don’t want to be a Nuisance to you guys… I just want to Understand why I failed and how
    I can fix it.

  • Kind Regards
    LikeMyDeathNote.

1 Like

it may be that you did Vector3.new"x, y, z" since it is Vector3.new(x, y, z)

oh my god…

I copy pasted some code and I didn’t notice…
you are my hero

1 Like

np, im glad i helped you with your problem c:

now I only need to find out how change the origin to make it go up