Time Script into GUI

I have a time script, how would I show the time onto a GUI???

How is your current script set up, is it a variable, number value, string value?

local Alien = game.ServerStorage.Alien
local AlienAmount = 50 

local SpawnedAliens = {}
local AlreadySpawned = false
while true do
	if (game.Lighting.ClockTime < 5 or game.Lighting.ClockTime > 18) and not AlreadySpawned then
		AlreadySpawned = true
		for i = 1, AlienAmount do
			local AlienClone = Alien:Clone()
			AlienClone.Parent = workspace
			table.insert(SpawnedAliens, AlienClone)
			wait(0.25)
		end
	elseif not (game.Lighting.ClockTime < 5 or game.Lighting.ClockTime > 18) and AlreadySpawned == true then
		if #SpawnedAliens > 0 then
			for i,v in pairs(SpawnedAliens) do
				if v ~= nil then
					v:Destroy()
				end
			end
		end
		AlreadySpawned = false
	end
	wait(1)
end

It also is made to spawn and despawn aliens

what time are you wanting to show cause this script doesnt change the time

1 Like