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: Player gets removed from game?

Previous Thread :: Next Thread 
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
11 Apr 2013 08:00 PM
On my first place, click the button at the end.

--awesome404's Course Completion Script 2.0
Win = Workspace.Course1.WinBrick
Course1 = Workspace.Course1
Course2 = game.Lighting.Course2
KIllbrick = Workspace.Course1.Killbrick
Door = Workspace.MainDoor

function onClick(Win)
Win:Destroy()
local m = Instance.new("Message", Workspace)
m.Text = "Someone has won this course."
wait(3)
m.Text = "Loading next course."
wait(.5)
m.Text = "Loading next course.."
wait(.5)
m.Text = "Loading next course..."
Course1:remove()
Course2:Clone().Parent = Workspace
wait(.5)
m.Text = "Course loaded."
wait(2)
m:Destroy()
wait(1)
Door.Transparency = .2
wait(.1)
Door.Transparency = .4
wait(.1)
Door.Transparency = .6
wait(.1)
Door.Transparency = .8
wait(.1)
Door.Transparency = 1
Door.CanCollide = false
wait(7) -- Gives players seven seconds to enter course
Door.CanCollide = true
Door.Transparency = .8
wait(.1)
Door.Transparency = .6
wait(.1)
Door.Transparency = .4
wait(.1)
Door.Transparency = .2
wait(.1)
Door.Transparency = 0
end

Win.ClickDetector.MouseClick:connect(onClick)
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
11 Apr 2013 08:04 PM
What do you mean by "Player gets removed from game"?
If you mean, you want all of the players to respawn, then here:

Win = Workspace.Course1.WinBrick
Course1 = Workspace.Course1
Course2 = game.Lighting.Course2
KIllbrick = Workspace.Course1.Killbrick
Door = Workspace.MainDoor

function onClick(Win)
Win:Destroy()
local m = Instance.new("Message", Workspace)
m.Text = "Someone has won this course."
wait(3)
m.Text = "Loading next course."
wait(.5)
m.Text = "Loading next course.."
wait(.5)
m.Text = "Loading next course..."
Course1:remove()
Course2:Clone().Parent = Workspace
for i,v in pairs(game.Players:GetPlayers()) do
v:LoadCharacter()
end
wait(.5)
m.Text = "Course loaded."
wait(2)
m:Destroy()
wait(1)
Door.Transparency = .2
wait(.1)
Door.Transparency = .4
wait(.1)
Door.Transparency = .6
wait(.1)
Door.Transparency = .8
wait(.1)
Door.Transparency = 1
Door.CanCollide = false
wait(7) -- Gives players seven seconds to enter course
Door.CanCollide = true
Door.Transparency = .8
wait(.1)
Door.Transparency = .6
wait(.1)
Door.Transparency = .4
wait(.1)
Door.Transparency = .2
wait(.1)
Door.Transparency = 0
end

Win.ClickDetector.MouseClick:connect(onClick)
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
11 Apr 2013 08:05 PM
Click the button at the end of the level, the player gets removed FROM THE GAME
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
11 Apr 2013 08:07 PM
So you want them to be kicked or are they being kicked without you wanting to be kicked?
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
11 Apr 2013 08:08 PM
The latter
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
11 Apr 2013 08:09 PM
The latter, what is "The latter"?
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
11 Apr 2013 08:10 PM
I don't want them to be kicked
Report Abuse
dnic1997 is not online. dnic1997
Joined: 08 May 2010
Total Posts: 309
11 Apr 2013 08:12 PM
Well, in this script, it doesn't have the players being kicked.
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
11 Apr 2013 08:13 PM
I know :(
It must be when Course1 gets removed.
Report Abuse
awesome404 is not online. awesome404
Joined: 11 Jan 2009
Total Posts: 3601
11 Apr 2013 08:15 PM
Fixed it, by removing the line:

Win:Destroy()
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