local Actions = game:GetService("ContextActionService") local player = game:GetService("Players").LocalPlayer local light local function bind(character) local head = character:WaitForChild("Head") light = Instance.new("SpotLight", head) light.Face, light.Angle, light.Range = Enum.NormalId.Front, 65, 24 light.Brightness, light.Enabled = 2, false end player.CharacterAdded:Connect(bind) if player.Character then task.spawn(bind, player.Character) end Actions:BindAction("ToggleFlashlight", function(_, state) if state == Enum.UserInputState.Begin and light and light.Parent then light.Enabled = not light.Enabled end return Enum.ContextActionResult.Sink end, true, Enum.KeyCode.F) Actions:SetTitle("ToggleFlashlight", "Light")