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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Spawning script

Previous Thread :: Next Thread 
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
18 Feb 2016 04:49 PM
local player = Game.Players.LocalPlayer
player.PlayerGui.SpawnCover.Tunnel.Visible = false
local spawned = false
math.randomseed(tick())

wait(math.random(15,35)/10)
local region = script.Parent.region.Value

function check(spawn)
local f = Game.Players:GetChildren()
for x = 1, #f do
if f[x].Character then
if f[x].Character:findFirstChild("Torso") then
if (f[x].Character.Torso.Position - spawn.Position).magnitude < 420 then
return false
end
end
end
end
if region == 2 then
if spawn.Position.Z > -2500 then return false end
elseif region == 3 then
if spawn.Position.X < 2500 then return false end
elseif region == 4 then
if spawn.Position.Z < 2500 then return false end
elseif region == 5 then
if spawn.Position.X > -2500 then return false end
end
return true end

while true do
wait(math.random(20,50)/30)
local s = Game.Workspace.SpawnLocations:GetChildren()
local bazinga = math.random(1,#s)
if (check(s[bazinga])) then
if not spawned then
spawned = true
player.Character:TranslateBy(s[bazinga].Position + Vector3.new(0,5,0) - player.Character.Torso.Position)
script.Parent.Text.Visible = false
player.Character.Humanoid.WalkSpeed = 16
player.PlayerGui.Inventory.OpenClose.Visible = true
player.PlayerGui.MyGroup.GroupButton.Visible = true
player.PlayerGui.SpawnCover.VisibleVal.Value = 0
script.Parent:Destroy()
end
end
end

I changed the bricks that were suppose to be on to be spawned but I can't spawn onto the brick. (This is from the createcharacter to the map)
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
18 Feb 2016 04:49 PM
I can give a free model of how the script and the GUIs, with the teleport
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
18 Feb 2016 06:32 PM
Bumpity bump bump
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
18 Feb 2016 06:37 PM
Booooompity booomp boomp
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
18 Feb 2016 06:53 PM
BAWWWMPPITYYY BAAWWPPPP BAAAAWWPPPP
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
19 Feb 2016 04:13 AM
beempity beep beep
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
19 Feb 2016 08:49 AM
WHY NO ONE GIVE ME HELP??!! *sighs*
Report Abuse
Lordlukervol is not online. Lordlukervol
Joined: 29 May 2012
Total Posts: 749
19 Feb 2016 08:56 AM
Maybe 'cus you haven't made it clear what exactly it is you're trying to accomplish
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
19 Feb 2016 09:09 PM
Well, has anyone posted anything that it needs to be more clear? More specific? Well if it isn't, I'm trying to make the player spawn from the customize character area into the open world, HOWEVER, I changed the teleport bricks on the map and now the script is broken.
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
20 Feb 2016 05:45 AM
GIVE HELPINGS! SUMBODY!
Report Abuse
Lordlukervol is not online. Lordlukervol
Joined: 29 May 2012
Total Posts: 749
20 Feb 2016 06:54 AM
local player = Game.Players.LocalPlayer
player.PlayerGui.SpawnCover.Tunnel.Visible = false
local spawned = false

While true do
wait(10)
local s = game.Workspace.SpawnLocations:GetChildren()
local bazinga = s[math.random(#s)]
player.Character.HumanoidRootPart.CFrame = bazinga.CFrame + Vector3.new(0,3,0)
script.Parent.Text.Visible = false
player.Character.Humanoid.WalkSpeed = 16
player.PlayerGui.Inventory.OpenClose.Visible = true
player.PlayerGui.MyGroup.GroupButton.Visible = true
player.PlayerGui.SpawnCover.VisibleVal.Value = 0
script.Parent:Destroy()

Report Abuse
Lordlukervol is not online. Lordlukervol
Joined: 29 May 2012
Total Posts: 749
20 Feb 2016 06:55 AM
local player = Game.Players.LocalPlayer
player.PlayerGui.SpawnCover.Tunnel.Visible = false
local spawned = false
wait(10)
local s = game.Workspace.SpawnLocations:GetChildren()
local bazinga = s[math.random(#s)]
player.Character.HumanoidRootPart.CFrame = bazinga.CFrame + Vector3.new(0,3,0)
script.Parent.Text.Visible = false
player.Character.Humanoid.WalkSpeed = 16
player.PlayerGui.Inventory.OpenClose.Visible = true
player.PlayerGui.MyGroup.GroupButton.Visible = true
player.PlayerGui.SpawnCover.VisibleVal.Value = 0
script.Parent:Destroy()


* Sorry, accidently copied your needless while true do
Report Abuse
IosifStaIin is not online. IosifStaIin
Joined: 24 Nov 2014
Total Posts: 45
20 Feb 2016 07:40 AM
OMG!! IT WORKS. THANK YOU SO MUCH. I LOVE YOU MATE! (NO H0M0)
Report Abuse
Lordlukervol is not online. Lordlukervol
Joined: 29 May 2012
Total Posts: 749
20 Feb 2016 09:36 AM
B) no problem man, I know what it's like to have a weird error that you can't seem to fix
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