So there's this part called "LightSource". When you click it, it disappears and produces light around the torso of the character that is clicking it. This script didn't work:
local Player = game.Players.LocalPlayer
local LightSource = game.Workspace.LightSource
local Mouse=Player:GetMouse()
Mouse.Button1Down:connect(function()
if Mouse.Target and Mouse.Target.Name == 'LightSource' then
if (Player:findFirstChild("Torso") ~= nil) then
local light = Instance.new("PointLight")
light.Parent = Player
light.Range = 15
end
if (Player:findFirstChild("Torso") == nil) then
end
LightSource:Remove()
end
end)

1 comment
Use the code block, please.