Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is my Gui script stuck at Spawning.Text = "Spawning..."?

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

0

dude you should really learn how to use variables to eliminate all those .Parent.Parent and so on. Holy cow!

0

I know them, but my friend gave me the script and I just couldn't be bothered to change them

0

That's a lot of script.Parent's you got there

0

makes sense

0

Yeah but none of you are answering the question

0

Which one of them is it stuck on. The first or second???

0

Are there any errors in the output?

0

The first one

0

No there are no errors

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.