I've figured out a way to spawn my train, but it's stuck at Spawning.Text = "Spawning..."
It's the first one, the one before wait(0.01) local clone = (etc.)
DaScript = script.Parent.RBXStudioTutorial
Frame = script.Parent.Parent
C70 = Frame:WaitForChild("Set1")
GUI = script.Parent.Parent
local train = game.ReplicatedStorage.C70Freight
local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
function C70Clicked()
if workspace:IsRegion3Empty(Region3.new(Vector3.new(467.505, 6.548, -3076.283), Vector3.new(1152.544, 6.559, -3298.865))) then
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.DriveFrame.Visible = false
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Spawning.Visible = true
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Spawning.Text = "Spawning..."
wait(0.01)
local clone = train:Clone()
clone.Parent = workspace
clone:MakeJoints()
clone.Bogies.SD_Bogie2:MakeJoints()
clone.Bogies.SD_Bogie:MakeJoints()
wait(1)
script.Parent.Parent.Parent.Parent.Character.HumanoidRootPart.CFrame = CFrame.new(610.265, 6.551, -3143.202)
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Spawning.Visible = false
Player.CameraMode = "Classic"
Camera.CameraType = "Custom"
Camera.FieldOfView = 80
wait(1)
script.Disabled = true
else
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.DriveFrame.Visible = false
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Spawning.Visible = true
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Spawning.Text = "Spawning..."
wait(1)
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Spawning.Text = "Spawn Occupied! Please wait."
wait(1)
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.DriveFrame.Visible = true
script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Spawning.Visible = false
end
end
C70.MouseButton1Click:connect(C70Clicked)

9 comments
dude you should really learn how to use variables to eliminate all those .Parent.Parent and so on. Holy cow!
I know them, but my friend gave me the script and I just couldn't be bothered to change them
That's a lot of script.Parent's you got there
makes sense
Yeah but none of you are answering the question
Which one of them is it stuck on. The first or second???
Are there any errors in the output?
The first one
No there are no errors