Hello.
I have created a script which listens to a remote event, but when the remote event gets fired, nothing happens (but, another local script does work from the same event). The script is as follows:
CountdownEvent = game.ReplicatedStorage.CountdownEvent
Countdown = script.Parent.Countdown
CountDownFinishEvent = game.ReplicatedStorage.CountdownFinish
local Warning = script.Parent.WARNING
local WarningInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local Warning1 = game:GetService("TweenService"):Create(Warning, WarningInfo, {TextTransparency = 0})
local Warning2 = game:GetService("TweenService"):Create(Warning, WarningInfo, {TextTransparency = 0.75})
local WarningEnd = game:GetService("TweenService"):Create(Warning, WarningInfo, {TextTransparency = 1})
local Done = false
function WarningBegin()
while true do
print("Looped!")
CountDownFinishEvent.OnClientEvent:Connect(function()
WarningEnd:Play()
print("Warning Breaked")
Done = true
return
end)
if Done == true then
break
end
Warning1:Play()
wait(1)
CountDownFinishEvent.OnClientEvent:Connect(function()
WarningEnd:Play()
print("Warning Breaked")
Done = true
return
end)
if Done == true then
break
end
Warning2:Play()
wait(1)
end
end
CountdownEvent.OnClientEvent:Connect(WarningBegin)
Thanks for the help!
EDIT - The remote event is the CountdownEvent, not CountDownFinishEvent.