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

Powerup spawning only in original barrel in workspace?

Asked by
Donut792 216 Moderation Voter
5 years ago
Edited 5 years ago

ok this one is gonna look really nooby on my behalf but i just cant figure out how to fix this

it spawns the powerup and prints bluebarrel appeared but the powerup doesnt spawn in the newly spawned barrel instead it goes inside the first one down the list of workspace

script:

workspace.ChildAdded:Connect(function(obj)
    if obj:IsA("UnionOperation") then
        if obj.Name == "BlueBarrel" then
            print("BlueBarrel Appeared")
            local Chance = math.random(1,5)
            local PowerupChance = math.random(1,5)

                local clone1 = game.ReplicatedStorage.SpeedUp:Clone()
                clone1.Parent = workspace
                clone1.Position = obj.Position

        end
    end
end)


script is spaced out a bit because i had some other code in before but im waiting to add it hence the chance and powerupchance variables

also no errors in output

0
You've posted the same question multiple times during the past few days if I'm not mistaken. EzraNehemiah_TF2 3552 — 5y
0
this is true, it just gets ignored as if noone sees it so i deleted my past one and posted it once more, Donut792 216 — 5y

Answer this question