Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 05 Jun 2014 05:57 PM |
--Before I start, I've had hell with this script… for some reason in God's name this won't work… after weeks of trying :L
--Problems: I have all of these bricks placed in the workspace, 1 table if for in the map, the other table is for the lobby. If a player spawns with the "IsPlaying" BoolValue equalling true then they should be moved into a random brick on the map, but if the "IsPlaying" BoolValue is false then they are moved to a random place on the lobby.
--Here's the code:
local MapSpawns = {Workspace.a.CFrame,Workspace.c.CFrame,Workspace.d.CFrame,Workspace.e.CFrame,Workspace.f.CFrame,Workspace.g.CFrame,Workspace.h.CFrame,Workspace.i.CFrame}
local LobbySpawns = {Workspace.Sp1.CFrame,Workspace.Sp2.CFrame,Workspace.Sp3.CFrame,Workspace.Sp4.CFrame, Workspace.Sp5.CFrame,Workspace.Sp6.CFrame,Workspace.Sp7.CFrame,Workspace.Sp8.CFrame,Workspace.Sp9.CFrame,Workspace.Sp10.CFrame}
local function SpawnCorrectly(Player) print(1) Player:WaitForChild("IsPlaying") print(2) Player.CharacterAdded:connect(function(char) if Player.IsPlaying.Value == true then print(3) char:WaitForChild("Torso").CFrame = MapSpawns[math.random(1,#MapSpawns)] print(4) elseif Player.IsPlaying.Value == false then print(3.1) char:WaitForChild("Torso").CFrame = LobbySpawns[math.random(1,#LobbySpawns)] print(4.1) end end) end
game.Players.PlayerAdded:connect(SpawnCorrectly) for Index, Player in pairs(game.Players:GetPlayers()) do SpawnCorrectly(Player) end
--The prints throughout the code all appear in the output, HOWEVER the player is never moved to the designated bricks…
--Someone please help~! |
|
|
| Report Abuse |
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
|
| 05 Jun 2014 05:59 PM |
| Really need help here… this should work but it does not… |
|
|
| Report Abuse |
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
| |
|
| 05 Jun 2014 06:07 PM |
| Don't disgrace god's name just cause your script won't work. |
|
|
| Report Abuse |
|
Azureous
|
  |
| Joined: 29 Jan 2012 |
| Total Posts: 25287 |
|
| |