Knexer
|
  |
| Joined: 03 May 2009 |
| Total Posts: 13851 |
|
|
| 28 Dec 2016 06:10 AM |
The following is an excerpt from a script that's giving me some trouble. I want it to run the endgame function whenever the game status changes to intermission (resp. "int"). It should remove the planet from workspace and then kill any of the remaining surviving players. However, it does neither. The script which is running the schedule isn't giving me any trouble, nor is the first half of this script. It seems that the error is probably in the endgame function somewhere but I can't find it and output is no help. Any insight would be greatly appreciated.
-----
function endgame() wait(0.5) gameplanet.Parent = nil local chars = game.Players:GetChildren() for i=1, #chars do if chars[i].isalive.Value == true then chars[i].Character.Humanoid.Health = 0 else end end end
function shift() chooseplanet() if status.Value == "game" then moveplayers() else endgame() end end
wait(0.5) status.Changed:connect(shift) |
|
|
| Report Abuse |
|
|
| 01 May 2017 11:11 AM |
| mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkllllllllllllllllllllllllllllldjjjjjjjjjjjjjjsioefheioiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiieeeeeeeeeeeeeeeeeeeee |
|
|
| Report Abuse |
|