generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Script Doesn't Teleport Players?

Previous Thread :: Next Thread 
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
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
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
20 Mar 2015 12:33 PM
Bump


~Even a Broken Clock is Right Twice a Day~
Report Abuse
Lecturous is not online. 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
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
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 is not online. 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
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image