I want to create a wave and enemy counter system. There was an issue.
I tried to create a wave system and an enemy counter system, I tested it and the script isn’t working. The dev console said this:
(it was a private/test game so don’t bother other free models)
I tried to find the solution but I can’t
Code for the UI Script:
local WaveValue = script.Parent.Parent.WaveValue
local CounterValue = script.Parent.Parent.CounterValue
local WaveUI = script.Parent.Wave
local EnemiesRemainingUI = script.Parent.EnemiesRemaining
WaveValue.Changed:Connect(function()
WaveUI.Text = WaveValue.Value
end)
CounterValue.Changed:Connect(function()
EnemiesRemainingUI.Text = CounterValue.Value
end)
Second Code that only to resists the first code:
local SSSCV = game.ServerScriptService.DreamManhuntModule.ModuleComponents.CounterValue
local SSSWV = game.ServerScriptService.DreamManhuntModule.ModuleComponents.WaveValue
while true do
script.Parent.CounterValue.Value = SSSCV.Value
script.Parent.WaveValue.Value = SSSWV.Value
wait(0.05)
end
The first code’s location is on the ScreenGui, it is a local script. The second code is on the StarterGui which is a normal script