#Why doesn't it spawn jump coins??

5 messages · Page 1 of 1 (latest)

viral shard
#

This is the spawn script:
local rs = game:GetService("ReplicatedStorage")

local minX = -186
local maxX = 298
local minZ = -311
local maxZ = 171

local CoinsAndOresHolder = workspace.CoinsAndOresHolder

local smallCoinJumpCount = 100
local mediumCoinJumpCount = 55
local bigCoinJumpCount = 20

local function addsmallJumpCoin()
local SmallJumpCoin = rs.CoinsNOres.JumpCoins.SmallJumpCoin:Clone()
SmallJumpCoin.Parent = CoinsAndOresHolder.SmallJumpCoins

local x = math.random(minX, maxX)
local z = math.random(minZ, maxZ)

SmallJumpCoin.Position = Vector3.new(x, 3.5, z)

end

local function addmediumJumpCoin()
local MediumJumpCoin = rs.CoinsNOres.JumpCoins.MediumJumpCoin:Clone()
MediumJumpCoin.Parent = CoinsAndOresHolder.MediumJumpCoins

local x = math.random(minX, maxX)
local z = math.random(minZ, maxZ)

MediumJumpCoin.Position = Vector3.new(x, 4.5, z)

end

local function addbigJumpCoin()
local BigJumpCoin = rs.CoinsNOres.JumpCoins.BigJumpCoin:Clone()
BigJumpCoin.Parent = CoinsAndOresHolder.BigJumpCoins

local x = math.random(minX, maxX)
local z = math.random(minZ, maxZ)

BigJumpCoin.Position = Vector3.new(x, 5, z)

end

while #CoinsAndOresHolder.SmallJumpCoin:GetChildren() <= smallCoinJumpCount do
addsmallJumpCoin()
end

while #CoinsAndOresHolder.MediumJumpCoin:GetChildren() <= mediumCoinJumpCount do
addmediumJumpCoin()
end

while #CoinsAndOresHolder.BigJumpCoin:GetChildren() <= bigCoinJumpCount do
addbigJumpCoin()
end

CoinsAndOresHolder.SmallJumpCoin.ChildRemoved:Connect(function()
wait(3)
addsmallJumpCoin()
end)

CoinsAndOresHolder.MediumJumpCoin.ChildRemoved:Connect(function()
wait(11)
addmediumJumpCoin()
end)

CoinsAndOresHolder.BigJumpCoin.ChildRemoved:Connect(function()
wait(18)
addbigJumpCoin()
end)

#

this is the error in the output, I cant figure out whats wrong

#

SmallJumpCoin is not a valid member of Folder "Workspace.CoinsAndOresHolder"

gusty crow
#

same thing goes for these