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

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

Asked by 7 years ago
Edited 7 years ago

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

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

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.

0
It is not on the same position though, the spawns are randomized Chuper62 35 — 7y
0
Does it do like a local Table = {Insert Spawns Here} spawn = math.random(#Table) ?... Because if not that could be an error itself. Vingam_Securis 213 — 7y
0
Nope Chuper62 35 — 7y
0
How does it randomize the spawns then ? o.O Vingam_Securis 213 — 7y
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)) Chuper62 35 — 7y
Ad

Answer this question