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

How would I make a click script in a part?

Hi, so, I want to make a clickdetector script for my game, but I have no idea what to put at the end.

function(clicky)
game.Lighting.TimeOfDay = 0
function:Connect(clicky)

can i get some help on this

2 answers

✓ Accepted answer

You have only 1 line correct, but two are a bit off. you have to identify it correctly, like this:

function clicky()
game.Lighting.TimeOfDay = 0
print("Time changed. Works!")
end

script.Parent.ClickDetector.MouseClick:Connect(clicky)

I don't understand what you want lol But this is what I think you want

local ClickDetector = --I don't know where did you put your script so fill this in

function clicky()
	game.Lighting.TimeOfDay = 0
end

ClickDetector.MouseClick:Connect(clicky)

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