hi so im attempting to make a script where if the player presses a button the time becomes 0 (night) but i dont even know where to begin. can i get some help?
✓ ANSWER ACCEPTED
how do I use userinputservice?
1 answer
✓ Accepted answer
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input,GPE) --GPE refers to gameProcessedEvent
if uis.KeyCode == Enum.KeyCode.ButtonName then -- Change to the preferred button
game.Lighting.ClockTime = 0
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
https://developer.roblox.com/en-us/api-reference/class/UserInputService perhaps this can help you understand UserInputService