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

Still having same problems with my SpawnLocations script? [ANSWERED]

Asked by 5 years ago
Edited 5 years ago

Same problem as my previous question. I've been at this problem for 2 days now and I'm about to give up now.

What's happening is when I put the Spawn Location script in a fresh new game by its self, it works. It stays in the game, it doesn't disappear, nothing. It works.

I have a second script in my game that creates a simple baseplate, that's it. When I put these two scripts in the same game together, the baseplate stays, but the Spawn Location disappears after about two seconds. Note that these are the only two scripts in my game.

Please......Help.....Me....

---Creates the BasePlate
function createMap()
    local bplate = Instance.new("Part")
    bplate.Name = "BasePlate"
    bplate.Anchored = true
    bplate.BrickColor = BrickColor.new("Earth green")
    bplate.Material = "Grass"
    bplate.Transparency = 0
    bplate.Position = Vector3.new(114,-10,28.5)
    bplate.Size = Vector3.new(740,20,261)
    bplate.TopSurface = "Smooth"
    bplate.Parent = game.Workspace
end

createMap()


---Creates the Spawn Locations
function createSpawn()
    local spawnLocation = Instance.new("SpawnLocation")
    spawnLocation.Parent = workspace
    spawnLocation.Position = Vector3.new(-11, 0.5, -28)
    spawnLocation.Transparency = 1
    spawnLocation.CanCollide = false
end

createSpawn()

3
Make sure the spawnLocation is anchored? seith14 206 — 5y
2
Yeah, make sure it's anchored. Also, parent the spawn location LAST, to up the game performance. Unless your game is some lag simulator. User#19524 175 — 5y
0
The Spawn Location was falling through the base plate this whole time... Thank you so much. Also parented the spawn location last now. Again, thanks so much ReynaldoVictarion 70 — 5y

Answer this question