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: Why is this playing up

Previous Thread :: Next Thread 
FactualTheory is not online. FactualTheory
Joined: 10 Sep 2013
Total Posts: 1365
01 Aug 2015 09:44 PM
for i, v in pairs (game.Players:GetChildren()) do
if v.PlayerStats.runner.Value == true then
local spawns = game.Workspace.run:GetChildren()
local pickedspawn = spawns[math.random(1, #spawns)]
v.Character:MoveTo(Vector3.new(pickedspawn.Position))
elseif v.PlayerStats.chaser.Value == true then
v.Character:MoveTo(Vector3.new(game.Workspace.chaser.Position))
end
end

havent tested it with runner, but if chaser is true it teleports you to 0, 0, 0 NOT where chaser.Position is.
Report Abuse
FactualTheory is not online. FactualTheory
Joined: 10 Sep 2013
Total Posts: 1365
01 Aug 2015 09:49 PM
bump

explane ples
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
01 Aug 2015 09:49 PM
That means workspace.chaser.Position is nil

If chaser is a Model then that is your problem.
Report Abuse
FactualTheory is not online. FactualTheory
Joined: 10 Sep 2013
Total Posts: 1365
01 Aug 2015 09:50 PM
its a part

dammit flood post
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
01 Aug 2015 09:52 PM
Try this:

for i, v in pairs (game.Players:GetChildren()) do
if v.PlayerStats.runner.Value == true then
local spawns = game.Workspace.run:GetChildren()
local pickedspawn = spawns[math.random(1, #spawns)]
v.Character:MoveTo(Vector3.new(pickedspawn.Position))
elseif v.PlayerStats.chaser.Value == true then
v.Character:MoveTo(game.Workspace.chaser.Position)
end
end

u sicko!
Report Abuse
FutureWebsiteOwner is not online. FutureWebsiteOwner
Joined: 29 Jul 2014
Total Posts: 468
01 Aug 2015 09:53 PM
yeah ^

the Position property is already a Vector3 so you dont need:
Vector3.new(part.Position)
Report Abuse
FactualTheory is not online. FactualTheory
Joined: 10 Sep 2013
Total Posts: 1365
01 Aug 2015 09:54 PM
it works for chaser, but not runner.

I cant even see a difference.
Report Abuse
StrategyGames is not online. StrategyGames
Joined: 02 Dec 2006
Total Posts: 3677
01 Aug 2015 10:05 PM
for i, v in pairs (game.Players:GetChildren()) do
if v.PlayerStats.runner.Value == true then
local thisTorso = v.Character.Torso
local bCh = game.Workspace.run:GetChildren()
local eww = bCh[math.random(1, #bCh)].CFrame + Vector3.new(0, 5, 0)
while thisTorso.CFrame ~= CFrame.new(eww.p) do
wait()
thisTorso.CFrame = CFrame.new(eww.p)
end
elseif v.PlayerStats.chaser.Value == true then
local thisTorso = v.Character.Torso
thisTorso.CFrame = CFrame.new(game.Workspace.chaser.p)
end
end
Report Abuse
StrategyGames is not online. StrategyGames
Joined: 02 Dec 2006
Total Posts: 3677
01 Aug 2015 10:33 PM
Did that works?
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