How to make a GUI Tween at a Certain duration of a clocktime

So I am wanting a GUI to tween at 8 O’clock in the morning. Ive taken some consideration of this post, but it never got a complete solution. Firing a remote event at a certain clocktime problem
Here is my current script. Please help me find my error.

local SchoolTask = game.ReplicatedStorage.SchoolTask
local Light = game.Lighting
local TaskGUI = game.StarterGui.SchoolTask.TextLabel.TextLabel_Roundify_12px
local Lighting = game:GetService("Lighting")
Lighting:GetPropertyChangedSignal("ClockTime"):Connect(function()
	if Lighting.ClockTime == 8 then
		SchoolTask.OnClientEvent:Connect(function()
			game.StarterGui.SchoolTask.TextLabel.TextLabel_Roundify_12px:TweenPosition(UDim2.new(0.404, 0,0.558, 0),"InOut","Sine",1)
		end)
	end
end)
1 Like

try firing the remote at 8 O’clock and make the gui tween as normal so script would be

SchoolTask.OnClientEvent:Connect(function()
  --tween here
end)

anyways if it didnt work pls show the firing event script

I can already see many problems with your code. For example, you define variables but dont use them. You also do a connection inside a function, which is usually not a good idea. Instead, just check if Lighting.ClockTime is 8. If so, then tween the gui. (Remove the OnClientEvent, its completely unneccecary, and if you dont understand remoteEvents please read up on the wiki.)