Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a focusing spotlight?

I have a stage in my roblox place and love the dynamic lighting so I want to add a spotlight that automatically follows a person. I would like it hooked up to a switch so I could turn it on or off at the times I want.

P.S. Maybe a way to have it switch players or focus on multiple people

3 answers

Just put a light in the person's torso?

function giveLight(plr)
	local light = Instance.new("PointLight", plr.Character.Torso);
	light.Color = Color3.new(0,0,0);
	light.Brightness = 1;
end

Er, thass not what he asked for. Make sure your light brick has hinges and stuff. PM me and I can help you actually make the model if you need help.

LB = INSERT DIRECTORY OF LIGHT WITH THE BRICK IN IT
RP = Instance.new("RocketPropulsion")
T = DIRECTORY OF PLAYER YOU WANT IT TO POINT AT
B = DIRECTORY OF BUTTON (MAKE SURE IT HAS A CLICK DETECTOR)
BOOL = DIRECTORY OF A BOOL VALUE PLEASE

B.ClickDetector.Clicked:connect(function ()
	if BOOL == false then
		LB.Light.Enabled = true
		RP.Target = T
		RP:Fire()
		RP.MaxForce = Vector3.new(5)
	elseif BOOL == true then
	RP:Abort()
	LB.Light.Enabled = false
end)

Remember to PM me if you have any trouble. Upvote if I helped.

please make a model and then that well help for sure not that im asking just want that spot light

This discussion is preserved as it was. New answers, comments, and votes are closed.