I’m making a part that changes time when you click on it, it works but it says “Attempt to connect failed: Passed value is not a function”, and I have no idea how to fix it.
What are you wanting this line to do? It’s not click from what your post is.
If you meant for it to have the same function as the MouseClick does, then you should do this:
local function MouseClick()
game.Lighting.TimeOfDay = "20:30:00"
end
ClickDetector.MouseClick:Connect(MouseClick)
script.Parent.Touched:Connect(MouseClick)