--TetherBLOX
local player = game.Players.LocalPlayer
local character = player.Character
local mouse = player:GetMouse()
local brick = Instance.new('Part', character)
local weld = Instance.new('Weld', brick)
local light = Instance.new('SpotLight', brick)
local enabled = true
brick.CFrame = CFrame.new(character.Torso.Position)
weld.Part0 = character.Torso
weld.Part1 = brick
brick.Transparency = 1
light.Angle = 180
light.Brightness = 40
mouse.KeyDown:connect(function(key)
if key == 'f' and enabled then
light.Enabled = false
enabled = false
elseif key == 'f' and not enabled then
light.Enabled = true
enabled = true
end
end)
Error: 12:06:37.016 - Players.Player3.Backpack.LocalScript:11: attempt to index local 'character' (a nil value) 12:06:37.017 - Stack Begin 12:06:37.017 - Script 'Players.Player3.Backpack.LocalScript', Line 11 12:06:37.018 - Stack End

2 comments
It worked! :)
No problem. :) I prefer 'repeat until nil' loops when it comes to LocalScripts, as damagex443 said, you could use the 'CharacterAdded' event, but I prefer the 'repeat until nil' overall. :P