I want to make a rocket live event (test) and i want to launch the rocket now and is not working for some reason,here’s the script
local launchEvent = workspace.RocketModel.Launch
local EventStart = 1622463000
local EventStop = 1622466600
local EventTime = workspace.EventText.TextPart.SurfaceGui.EventTime
while wait(1) do
local currentTime = os.time()
if currentTime >= EventStop then
break
end
if currentTime >= EventStart then
launchEvent:Fire()
EventTime.Text = "Starting live event!"
break
else
local secondsleft = EventStart - currentTime
local days = math.floor(secondsleft % (60*60*24*30) / (60*60*24))
local hours = math.floor(secondsleft % (60*60*24) / (60*60))
local minutes = math.floor(secondsleft % (60*60) / 60)
local seconds = secondsleft % 60
EventTime.Text = "Time till live-event: "..days.." Days "..hours.." Hours "..minutes.." Minutes "..seconds.." seconds!"
end
I find insufficient information about what the issue is. It looks like the launchEvent is fired and that the rocket isn’t exactly launching as intended?
Can’t understand what you said. If I would be making a live event I would just update the text in the gui every second then start the event when gui text is 0.
local launchEvent = workspace.RocketModel.Launch
local EventStart = -- Start Time Here
local EventStop = -- End Time Here
local EventTime = workspace.EventText.TextPart.SurfaceGui.EventTime
while wait(1) do
local currentTime = os.time()
if currentTime >= EventStop then
break
end
if currentTime >= EventStart then
launchEvent:Fire()
EventTime.Text = "Starting live event!"
break
else
local secondsleft = EventStart - currentTime
local days = math.floor(secondsleft % (60*60*24*30) / (60*60*24))
local hours = math.floor(secondsleft % (60*60*24) / (60*60))
local minutes = math.floor(secondsleft % (60*60) / 60)
local seconds = secondsleft % 60
EventTime.Text = "Time till live-event: "..days.." Days "..hours.." Hours "..minutes.." Minutes "..seconds.." seconds!"
end
end