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

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

Asked by 5 years ago
Edited 5 years ago

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)
0
dude you should really learn how to use variables to eliminate all those .Parent.Parent and so on. Holy cow! User#21908 42 — 5y
0
I know them, but my friend gave me the script and I just couldn't be bothered to change them CarlPlandog 20 — 5y
0
That's a lot of script.Parent's you got there saSlol2436 716 — 5y
0
makes sense saSlol2436 716 — 5y
View all comments (5 more)
0
Yeah but none of you are answering the question CarlPlandog 20 — 5y
0
Which one of them is it stuck on. The first or second??? casper123123123 357 — 5y
0
Are there any errors in the output? saSlol2436 716 — 5y
0
The first one CarlPlandog 20 — 5y
0
No there are no errors CarlPlandog 20 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Does anyone know how to fix it?

Ad

Answer this question