Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Map Loading?

Asked by 9 years ago

The Sinking Ship in Lighting keeps Loading and Loading... here's the script am using??

game.Workspace.PartL.Transparency = 0 game.Workspace.PartL.CanCollide = true wait(10)
while true do game.Workspace.PartL.Transparency = 1 game.Workspace.PartL.CanCollide = false game.Lighting.SinkingShip:clone().Parent = game.Workspace --clone print("SS Loaded!") wait(5) end target = CFrame.new(14.6, 96, 5.9) for i, player in ipairs(game.Players:GetChildren()) do player.Character.Torso.CFrame = target + Vector3.new(0, i * 6, 0) end wait(10) game.Workspace.SinkingShip:remove() wait() game.Workspace.PartL.Transparency = 0 game.Workspace.PartL.CanCollide = true

1
Can you edit this please, put the code in a Lua block DewnOracle 115 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago
game.Workspace.PartL.Transparency = 0
game.Workspace.PartL.CanCollide = true
wait(10)
while true do --loop
game.Workspace.PartL.Transparency = 1
game.Workspace.PartL.CanCollide = false
game.Lighting.SinkingShip:clone().Parent = game.Workspace --clone 
print("SS Loaded!")
wait(5)
--end --loop ends, below code will never execute since 'true' is the condition for the loop
target = CFrame.new(14.6, 96, 5.9)
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = target + Vector3.new(0, i * 6, 0)
end
wait(10)
game.Workspace.SinkingShip:Destroy() --destroy method is more efficient
wait()
game.Workspace.PartL.Transparency = 0
game.Workspace.PartL.CanCollide = true
end --end loop here? I am guessing this is what you want to do.
Ad

Answer this question