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

Help With Loading In Maps?

Asked by
Scootakip 299 Moderation Voter
9 years ago
01gm = game.Workspace.GMstat.Intermission
02 
03while true do
04ToMapOne = CFrame.new(-2, 20.5, -50)
05ToMapTwo = CFrame.new(-27, 69.5, 18)
06ToSpawn = CFrame.new(277.5, 1.5, -206.5)
07mapc = game.Workspace.MapNum.Value
08wait(30)
09gm.Name = "Game In Progress"
10for i, player in ipairs(game.Players:GetChildren()) do
11   if player.Character and player.Character:FindFirstChild("Torso") then
12    mapc.Value = (math.random(2))
13    if mapc.Value == 1 then
14      print(mapc.Value)
15      player.Character.Torso.CFrame = ToMapOne + Vector3.new(0, i * 5, 0)
View all 49 lines...

I'm having a serious issue with this script. Currently I have 2 maps, the map is chosen by math.random, I don't know what exactly is wrong with this but I think it's because different players are getting different numbers, resulting in multiple maps being called to load. Can someone tell me how to fix this? The number that's randomly chosen is then given to an intvalue and then the script goes to the intvalue for what to do, so I'm not sure why it's giving multiple numbers. This issue only happens when there are multiple people BTW.

0
This shouldn't be a localscript, if it is. HungryJaffer 1246 — 9y
0
I also reccomend editing this after reading this: It helps other people understand the script: https://scriptinghelpers.org/blog/clean-and-tidy HungryJaffer 1246 — 9y
0
It's not a local script Scootakip 299 — 9y

Answer this question