How to Respawn Ship after sinking?

I made a sinking ship game and got everything ready but I wanna know how to make it respawn after sink.

Ik how to clone it and stuff but idk how to do it at exact time but I will not play the game and wait and calculate how long until its done sinking because it will take forever. Any advice?

1 Like

I guess you could check if it’s in the workspace every few seconds, and if it’s not, clone the boat from the ServerStorage using a server script.

Cloning is as simple as
local Thing = Instance:Clone()
then setting the parent
Thing.Parent = workspace

1 Like

Please use default format because we can’t help you without enough informations.

I want to know how to respawn a sinking ship after it is done sinking. The sinking takes so long like 1 hour or something but I am not gonna calculate how long it really is by playing it because It will take so long. I need help how to calculate time when its done sinking so I can respawn it.

Without showing us code we can’t help you.

So something like this would work?

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Name == 'Ship' then
		workspace.Ship:Destroy()
		m = Instance.new("Message")
		m.Parent = workspace
		m.Text = "Ship has sank.. Respawning in 5 seconds."
		wait(5)
		m:Destroy()
		workspace.Sink.Value = false
		game.ServerStorage.Iceberg:Clone().Parent = workspace
		game.ServerStorage.Ship:Clone().Parent = workspace
		game.ServerStorage.End:Clone().Parent = workspace
		wait(1)
		for i,v in pairs(game.Players:GetPlayers()) do
			v.Character.Humanoid.Health = 0
		end
	end
end)

Yup. Should. Note that the position the items/parts will be is where they were LAST in the workspace, so if you want them to be a certain place without actually changing their position, move them to where you want them to spawn, then move them into the server storage.

Also: Instance | Roblox Creator Documentation

1 Like

Thanks it works

Character Limit.