(for jtoh builders and players) how do i make a point light be on your torso when you touch a button? (has to be client sided)

i have been having trouble making a button that gives you a point light on your torso
any help would be appreciated

1 Like
local part = script.Parent

part.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local char = hit.Parent
		local torso = char:WaitForChild("Torso")
		local light = Instance.new("PointLight")
		light.Parent = torso
		--change other light properties here
	end
end)

Will only work with R6 avatars because only they have the “Torso” part.

2 Likes

Just find this location in its the button ClientObjectScript and insert the singular PointLight line, then you can adjust its properties as needed

return function()
	local pr=p:WaitForChild'Pressed'
	-- etc
	script.Parent.Touched:Connect(function(t)
		local h=t.Parent:FindFirstChild'Humanoid'
		-- etc
		if (yesplr or yesbox or yesbal) and not pr.Value then
			pr.Value=true
			local pointLight = Instance.new("PointLight", t.Parent.Torso) -- put this line just right here

You probably should have asked in #tower-development on the discord

2 Likes

oh yeah i forgot lol
thanks for the help

1 Like

thanks for the help :slight_smile: i appreciate it

1 Like