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 » Scripting Helpers
Home Search
 

Re: Personal spawn

Previous Thread :: Next Thread 
EMAN381 is not online. EMAN381
Joined: 27 Nov 2007
Total Posts: 4300
08 Nov 2011 09:20 AM
function onAdded(object)
local player = game.Players:playerFromCharacter(object)
if player ~= nil then
local owner = player:findFirstChild("e_man")
local spawn = script.Parent.Spawn
if owner ~= nil then
object.Torso.CFrame = object.Torso.CFrame + Vector3.new(0,3,0)
wait()
object.Torso.CFrame = spawn.CFrame + Vector3.new(0,3,0)
end
end
end

game.Workspace.ChildAdded:connect(onAdded)

--The parent property is inside the spawn, and when I was testing it, it was in game.Workspace and now that I moved it, it's not working nor is there any output error.
Report Abuse
phoenix53124 is not online. phoenix53124
Joined: 25 Feb 2009
Total Posts: 4889
08 Nov 2011 09:25 AM
game.Players.Playeradded:connect(function(p)
if p.Name == "eman381" then
p.Character.Torso.CFrame = game.Workspace["YOURSPAWNNAME"].CFrame + Vector3.new(0,5,0)
end
end)
Report Abuse
EMAN381 is not online. EMAN381
Joined: 27 Nov 2007
Total Posts: 4300
08 Nov 2011 09:29 AM
Well actually I need it as a value, and it's whenever a player spawns, not when he enters the game.
Report Abuse
EMAN381 is not online. EMAN381
Joined: 27 Nov 2007
Total Posts: 4300
08 Nov 2011 09:32 AM
NEVERMIND! I fixed it now.

I made it script.Parent.Spawn instead of script.Parent.

Well thank you for helping, though!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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