I have this script, well it's a LocalScript. It is in a GUI where it should toggle a PointLight I have placed in the characters torso to Enable and Disable but it does nothing. Like just nothing happens and no output errors either I'm lost, any help?
local player = game.Players.LocalPlayer
local char = player:WaitForChild("Character")
local but = script.Parent
local light = Instance.new("PointLight", char.UpperTorso)
local ison = but.ison
ison.Value = false
light.Name = "Charlight"
light.Enabled = false
light.Range = 12
light.Brightness = 1.5
but.MouseButton1Down:connect(function()
if ison.Value == false then
light.Enabled = true
ison.Value = true
elseif ison.Value == true then
light.Enabled = false
ison.Value = false
end
end)
Any help is appreciated :)

2 comments
Put a print after line two, and say if it prints
No print, I suppose it's not finding the Character?