script 1:
local ship = workspace.Ship local value = workspace.Value.Value if value == 'intermission' then local new = ship:Clone() new.Parent = game.ServerStorage value = 'ready' end if value == 'regening' then local shipclone = game.ServerStorage.Ship local map = shipclone map.Parent = workspace value = 'intermission' end
script 2:
local ship = script.Parent local value = workspace.Value.Value local PP = script.Parent.PrimaryPart local explosion = workspace.Explosion local sinking = workspace["Ship Sink 1"] local wave = workspace["Ocean wave sound effects [HD]"] workspace["Titanic Grand Staircase Ambiance "]:Play() wave:Play() function sink() value = 'sinking' --private scripting end value = 'regening' if value == 'ready' then wait(60) sink() end
Pls help
You want to use Changed
on problems like this.
Only use Changed
on values like Stringvalue or intvalues
local ship = workspace.Ship local value = workspace.Value value.Changed:Connect(function() -- ONLY USE CHANGED FOR STRINGVALUES, OBJECTVALUES, INTVALUES AND NUMBERVALUE, CFRAMEVALUES if value.Value == 'intermission' then local new = ship:Clone() new.Parent = game.ServerStorage value.Value = 'ready' elseif value.Value == 'regening' then local shipclone = game.ServerStorage.Ship local map = shipclone map.Parent = workspace value.Value = 'intermission' end end)
Script 2:
local ship = script.Parent local value = workspace.Value.Value local PP = script.Parent.PrimaryPart local explosion = workspace.Explosion local sinking = workspace["Ship Sink 1"] local wave = workspace["Ocean wave sound effects [HD]"] workspace["Titanic Grand Staircase Ambiance "]:Play() wave:Play() function sink() value = 'sinking' --private scripting wait(100) -- Change this to how long you think it should sink for value.Value = 'regening' end value.Changed:Connect(function() if value.Value == 'ready' then wait(60) sink() end end)
If this helped, please mark this as the answer