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: Trying to have a spawn that only spawns me

Previous Thread :: Next Thread 
lvl45Sandslash is not online. lvl45Sandslash
Joined: 08 Feb 2014
Total Posts: 8
26 Jun 2014 03:11 AM
but it doesn't work, please help

permission = {"lvl45Sandslash"}


function checkOkToLetIn(name)
for i = 1,#permission do
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end

function onPlayerEntered(newPlayer)
print("Person Spawned")
local human = newPlayer:findFirstChild("Backpack")
if (human ~= nil ) then
if (checkOkToLetIn(human.Parent.Name)) then
human.Parent.TeamColor=script.Parent.TeamColor
end
end
end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
JustinJsT is not online. JustinJsT
Joined: 26 Sep 2010
Total Posts: 7818
26 Jun 2014 03:14 AM
be less sucky
Report Abuse
FlamesOfHatred is not online. FlamesOfHatred
Joined: 24 Apr 2014
Total Posts: 90
26 Jun 2014 03:34 AM
Why not make a "SpawnLocation" and Make a team then disable Neutral then change the Team Color to your Team Color?
Report Abuse
boogerfingerss is not online. boogerfingerss
Joined: 11 Sep 2011
Total Posts: 32
26 Jun 2014 03:50 AM
UOnlySpawnPoint = Path to part you want to spawn at

game.Players.ChildAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if char.Name == "YourNameHere" then
char.Torso.CFrame = CFrame.new(UOnlySpawnPoint.Position+Vector3.new(0,5,0))
end end) end)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Or if you wanna have multiple peopless..

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

VipSpawnPeoplez = {"Yourname","Goulstem","Friends Name","Doge"}
VipSpawnPoint = Path to part you want to spawn at

game.Players.ChildAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if table.concat(VipSpawnPeoplez," "):match(char.Name) then
char.Torso.CFrame = CFrame.new(VipSpawnPoint.Position+Vector3.new(0,5,0))
end end) end)

--scripts go shorter if'd table.concat ._.

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