Without binding an event
while true do
local h = Instance.new("Hint")
h.Text = "Meteors incoming, stay away from these fireballs!"
h:Clone()
local d = game:GetService("ServerStorage").Dup:Clone()
wait(25)
h.Parent = workspace
d.Parent = workspace
end
With binding an event
local bevent = script.BindabeEvent
bevent.Event:Connect(function()
local h = Instance.new("Hint")
h.Text = "Meteors incoming, stay away from these fireballs!"
h:Clone()
local d = game:GetService("ServerStorage").Dup:Clone()
wait(25)
h.Parent = workspace
d.Parent = workspace
end)
while true do
wait(25)
bevent:Fire()
end
and that is pretty much the same thing as function but with a child of script
so is it better using this method in the future?