Hello,
I’m trying to make a lightsaber customizer where you can change the color of a lightsaber and the way I was thinking of going about it was changing the color of a Particle Emitter when you touch a part but it is not working. Is there an easier way to do this?
Here’s my script
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local tool = player.Backpack.Saber
tool.Handle.Saber.SaberColor = Vector3.new(0,0,254)
end)
local tool = player:FindFirstChild('Backpack', true):FindFirstChild('Saber', false)
if tool then
tool.Handle.Saber.Color3 = Color3.fromRGB(0,0,254)
end
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local tool = player.Backpack.Saber
tool.Saber.SaberColor = Color3.fromRGB(0,0,254)
end)