|
| 20 Mar 2015 12:19 PM |
The problem is my script doesnt teleport any players, but works perfectly if I remove the v.Spectating == false part, How would I manage to fix this?
function EndGame() SpectateWin1.Transparency = 0 SpectateWin2.Transparency = 0 PRSIN = 0 t.Parent = game.Lighting.Maps game.Lighting.Empty.Parent = game.Workspace game.Workspace.Playing.Value = false h.Text = "The game is finished. Wow, that went by fast!" Lava.CFrame = CFrame.new(returnlavapos) Game_Light.BrickColor = BrickColor.new("Bright red") h.Text = "" for _,v in pairs(players:GetPlayers()) do Lava.Position = Vector3.new(29.4, -33.9, 16.5) if v:IsA("Player") and v.Spectating == false then local char = v.Character if char and char.Torso and not char:FindFirstChild("IsIn") then char.Torso.CFrame = TeleportEnd.CFrame+Vector3.new(math.random(-4, 4), 0, math.random(-4, 4)) v.TeamColor = BrickColor.new("Bright blue") --Lava.Position = Vector3.new(29.4, -33.9, 16.5) pcall(function() plrs:SaveNumber("Wins", plrs.leaderstats.Wins.Value) end) pcall(function() plrs:SaveNumber("Points", plrs.leaderstats.Points.Value) end) end end end end
~Even a Broken Clock is Right Twice a Day~ |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2015 12:33 PM |
Bump
~Even a Broken Clock is Right Twice a Day~ |
|
|
| Report Abuse |
|
|
Lecturous
|
  |
| Joined: 17 Aug 2013 |
| Total Posts: 1096 |
|
|
| 20 Mar 2015 12:35 PM |
why are you using data persistence? use data stores instead learn on wiki k thx bai
--{ Lecturous }-- |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2015 12:36 PM |
Thats not even relevant to what I asked k thanks bai.
~Even a Broken Clock is Right Twice a Day~ |
|
|
| Report Abuse |
|
|
Luminak
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
|
| 20 Mar 2015 12:51 PM |
don't have time to read it but use this example
plr = game.Players.LocalPlayer wait(1) plr.Torso.CFrame = game.Workspace.Teleportbrick1.CFrame |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2015 02:19 PM |
I know how to teleport a player. You have to read it to understand...
~Even a Broken Clock is Right Twice a Day~ |
|
|
| Report Abuse |
|
|