script:
local light = Instance.new('SurfaceLight')
local humanoidrootpart = script.Parent:WaitForChild("HumanoidRootPart")
repeat wait() until game.Players.LocalPlayer
local humanoidrootpart = game.Players.LocalPlayer.character:WaitForChild("HumanoidRootPart")
local mouse = game.Players.LocalPlayer:GetMouse()
light.Parent = humanoidrootpart
light.Brightness = 0
mouse.KeyDown:connect(function(key)
if key == "f" then
script.flashlight_on:Play()
light.Brightness = 5
end
end)
mouse.KeyUp:connect(function(key)
if key == "f" then
script.flashlight_off:Play()
light.Brightness = 0
end
end)

1 comment
and yes, it is in startercharacter scripts, and inside of a local script