I hate to make such a lengthy post, but I am completely stumped and want to make sure I get my idea across.
I have gotten the current version of the script to work in Studio / without FE. Whenever I test, it simply does not work. I have watched and tried multiple tutorial methods of implementing remote functions / events, but none of them seem to work for my case.
The current issue is a Gui, a timer, is supposed to appear and countdown to 0 for players to be ready for an incoming attack. As stated earlier, it works fine in studio, but the Gui will not clone with FE. I am fairly certain the issue lies within using LocalPlayer. I also am fairly certain that this cannot be fixed, and must be rewritten, as I am using repeat and not a function.
Relevant Code (This script is longer, but only this part is the current issue):
wait(1)
print("Script Running")
TIMER = game.ReplicatedStorage:WaitForChild("TIMER")
repeat
print("Engine Start")
script.Break.Value = 1
wait(1)
TIMER:clone().Parent = game.Players.LocalPlayer.PlayerGui
wait(10)
game.Soundscape.Ticking:Stop()
game.Players.LocalPlayer.PlayerGui.TIMER:remove()
script.Break.Value = 0
--.
--..
--...script is longer, but irrelevant
Script is in ServerScriptService, TIMER is in ReplicatedStorage
OUTPUTS:
Working Output:
Script Running
Engine Start
Dog Spawned
Broken Output:
Script Running
Engine Start
20:16:31.395 - ServerScriptService.ENGINE:19: attempt to index field 'LocalPlayer' (a nil value)
20:16:31.397 - Stack Begin
20:16:31.397 - Script 'ServerScriptService.ENGINE', Line 19
20:16:31.398 - Stack End
These lines numbers won't match up as I removed cluttering irrelevant code. But it should be from TIMER:clone().Parent = game.Players.LocalPlayer.PlayerGui.
If I left anything out, let me know and I will be sure to update this post.

5 comments
Don't use :remove use :Destroy
can you clearify a bit more, like what is "TIMER" and the scripts are confusing
also :clone() is decaperated, use :Clone()
if its a script and not local then use local player = game.Players.PlayerAdded:Connect(function(player)
i dont think you can put a event connecting to a function inside a variable