Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does one player fall of the map when the minigame started?

So, I created a game.. which is a minigame.. ofcourse in a minigame it has different maps, right? So when it is time to teleport users. One player falls off the map! I domt know whats the pronle I checked and made some hypothesis about it like maybe becauze of the graphics or some complicated stuff..

Here is the script for teleporting players(its not all.. ill just put the whole script when I get to use the computer, currently using mobile :l)

Torso.CFrame = CFrame.new(spawn.Position + Vector3.new(0, 3, 0))

the script works perfectly fine before, it telepprts all the players without falling from the map.. but somehow when I added some gui's and some more graphical features that happens...

Thank you for reading!

1 answer

Just a thought: You say that at least one player falls off when you teleport them? It could be because of the fact that they're all being merged together at once, causing them to fly out. Depending on the size of the spawn, try using math.random(1,5) or some other numbers that make it more appropriate for less phasing into each other.

In case you don't know what I mean:

Torso.CFrame = CFrame.new(spawn.Position + Vector3.new(math.random(1,5), 3, math.random(1,5))

Good luck, hope this helped!

EDIT: I forgot to mention, ROBLOX likes to position things RIGHT next to each other if they're all forced to the same position; though it's a little different from what I stated; it'll still stand with the answer given above.

5 comments

0

It is not on the same position though, the spawns are randomized

0

Does it do like a local Table = {Insert Spawns Here} spawn = math.random(#Table) ?... Because if not that could be an error itself.

0

Nope

0

How does it randomize the spawns then ? o.O

0

local spawnindex = math.random(1, #spawns) local spaw = spawns[spawnindex] if checkHumanoid and torso and spaw then local matchtag = Instance.new("StringValue") matchtag.Name = "MatchTag" matchtag.Parent = check if v ~= killer then table.remove(spawns, spawnindex) torso.CFrame = CFrame.new(spaw.Position + Vector3.new(0, 3, 0))

This discussion is preserved as it was. New answers, comments, and votes are closed.