Hello, I am making a torch for my game so other players can see in the dark, but the script is not working. I normally don’t put tools in my games but for this one I am. When I equip the tool I cannot see it. Thanks for any help!
Here is my explorer:
Here is the code:
local Torch = script.Parent.TorchHolder.FireHolder.FireLight
Light = false
script.Parent.Activated:Connect(function()
if Light == false then
Torch.Enabled = true
Light = true
else
Torch.Enabled = false
Light = false
end
end)
MathsHat2
(Fondue)
February 21, 2022, 10:11pm
#2
I think you need to set ‘Light = false’ into ‘local Light = false’
I did that and there was no change here is my output:
To have it so a player holds out a tool and be seen it needs to have a part named “Handle” which is the part being held in the tool
furkan806
(furkan806)
February 21, 2022, 10:23pm
#5
local Torch = script.Parent.TorchHolder.FireHolder.FireLight
local Light = false
local Handle = script.Parent.TorchHolder
script.Parent.Activated:Connect(function()
if Light == false then
Torch.Enabled = true
Light = true
else
Torch.Enabled = false
Light = false
end
end)