i got 2 text boxes, one for hours and one for minutes
how can i make it so the in game minutes is the same as the textbox for minutes text and in game hours is the same as the textbox for hours? local script:
script.Parent.MouseButton1Click:Connect(function()
local hour = tonumber(script.Parent.Parent.hour.Text)
local minute = tonumber(script.Parent.Parent.minutes.Text)
game.ReplicatedStorage["control time"]:FireServer(hour,minute)
end)
server script:
local minutes = 60 * 12
game.ReplicatedStorage["control time"].OnServerEvent:Connect(function(plr,hour,minute)
minutes = minute * hour
end)
while true do
game.Lighting:SetMinutesAfterMidnight(minutes)
minutes = minutes + 1
print(minutes)
if game.Lighting.ClockTime == 12 then
game.ServerStorage.day.Parent = game.Lighting
game.Lighting.night.Parent = game.ServerStorage
end
if game.Lighting.ClockTime == 18 then
game.Lighting.day.Parent = game.ServerStorage
game.ServerStorage.night.Parent = game.Lighting
end
wait(1.5)
end

3 comments
What is not working exactly?
Whats the Output
its working but no the way i want it to, its pretty hard to explain whats happening so its easier if you copy the code and do the same in a test game or something