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

My script needs help?

Asked by
lucas4114 607 Moderation Voter
9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Hhm.. I need help, I made this, it's ment to spawn a "Ball" in one of the spawners that are in the game.... It doesn't work...

RoundStart = script.Parent.Parent.RoundStart
Ball1 = game.ServerStorage.Ball1:Clone()

if RoundStart == true then
    local RandomSpawn = (math.random(8))
        if RandomSpawn == 1 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn1.Position
        end
        if RandomSpawn == 2 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn2.Position
        end
        if RandomSpawn == 3 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn3.Position
        end
        if RandomSpawn == 4 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn4.Position
        end
        if RandomSpawn == 5 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn5.Position
        end
        if RandomSpawn == 6 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn6.Position
        end
        if RandomSpawn == 7 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn7.Position
        end
        if RandomSpawn == 8 then
            Ball1.Parent = script.Parent
            Ball1.Position = script.Parent.Spawn8.Position
        end
end
1
RoundStart is a Boolean on line 04, but if you mean by if it `Existed` then you would just put `if RoundStart then` woodengop 1134 — 9y
0
Ooh, I forgot to put .value lucas4114 607 — 9y
0
But don't place it in your variable. woodengop 1134 — 9y
0
Yeah, I know... It's: if RoundStart.Value == true then lucas4114 607 — 9y
View all comments (3 more)
0
Did that solve your problem woodengop 1134 — 9y
0
Yup lucas4114 607 — 9y
0
Ugh. If you're answering someone's question, please make an answer. I thought that your answer didn't help, so I thought of something else, Europe. yumtaste 476 — 9y

Answer this question