My game uses dynamic lighting, and I don't understand how to give the character a pointlight on their torso.
Any help?
Thanks, FamousDoge
My game uses dynamic lighting, and I don't understand how to give the character a pointlight on their torso.
Any help?
Thanks, FamousDoge
local mouse = game.Players.LocalPlayer:GetMouse()
function Light()
player = game.Players.LocalPlayer
playerChar = player.Character
playerLight = playerChar.Torso:FindFirstChild("Light")
if playerLight then
playerLight:Destroy()
else
light = Instance.new("SpotLight",playerChar:FindFirstChild("Torso"))
light.Name = "Light"
end
end
mouse.KeyDown:connect(function(key)
key = key:lower()
if key == "e" then
Light()
end
end)
-- Put this inside of a local script
This discussion is preserved as it was. New answers, comments, and votes are closed.