Hi. I have a localscript inside a surface gui that is activated when a player presses a text button. The script then constructs a tower over a period of time, maybe around 30 seconds. The problem is that when the player leaves the server while the tower is being built, the script stops running and it leaves the tower that is being constructed in the middle of its construction phase.
Can anybody give me advice on how to stop this problem? Note: The script doesn't have to be a localscript, but it's more convenient if it is.
You could fire a RemoteEvent
that is located on the server.
local Event = ???? script.Parent.MouseButton1Down:connect(function() Event:FireServer(Arg1,Arg2) end)
Server Script:
local Event = ???? function Event.OnServerEvent(Player,Arg1,Arg2) --Stuff end