dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
|
| 23 Jan 2014 07:40 PM |
l = script.Parent.LevelBox p = script.Parent.playerbox s = script.Parent.submit k = script.Parent.kick c = script.Parent.coinbox k2 = script.Parent.kill player = game.Players.LocalPlayer if player.Name == "dom2d2" then l.Visible = true p.Visible = true s.Visible = true k.Visible = true c.Visible = true k2.Visible = true else if player.Name ~= "dom2d2" then l.Visible = false p.Visible = false s.Visible = false k.Visible = false c.Visible = false k2.Visible = false end end s.MouseButton1Click:connect(function() playername = p.Text level = l.Text coins = c.Text game.Players[playername].leaderstats.Level.Value = level game.Players[playername].leaderstats.Coins.Value = coins end) k2.MouseButton1Click:connect(function() playername = p.Text game.Players[playername].Character.Humanoid.Health = 0 end) k.MouseButton1Click:connect(function() playername = p.Text game.Players[playername]:Kick() end)
|
|
|
| Report Abuse |
|
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 23 Jan 2014 07:40 PM |
| There is probably, for some weird reason, a ScreenGui in Players with the Name datum of playername. |
|
|
| Report Abuse |
|
|
dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
|
| 23 Jan 2014 07:42 PM |
| I'm confused, so what should I do to fix this? |
|
|
| Report Abuse |
|
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 23 Jan 2014 07:43 PM |
| Preferably get rid of the ScreenGui. |
|
|
| Report Abuse |
|
|
dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
|
| 23 Jan 2014 07:44 PM |
The ScreenGUI is the purpose of this script, I can't just delete it.
|
|
|
| Report Abuse |
|
|
Absurdism
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 23 Jan 2014 07:53 PM |
| Why is it in Players and not PlayerGui/StarterGui? |
|
|
| Report Abuse |
|
|
dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
|
| 23 Jan 2014 07:55 PM |
It's in starterGUI, not players.
|
|
|
| Report Abuse |
|
|
dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Jan 2014 08:08 PM |
| add 1 more parent (called it) |
|
|
| Report Abuse |
|
|
dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
|
| 23 Jan 2014 08:11 PM |
That wouldn't work, because I have it structured like this.
AdminPanel (ScreenGUI) >>LocalScript >>LevelBox >>playerbox >>submit >>kick >>coinbox >>kill |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Jan 2014 08:14 PM |
| I only read the title of the thread e_e |
|
|
| Report Abuse |
|
|
dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
|
| 23 Jan 2014 09:12 PM |
| I still can't figure this out. |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 23 Jan 2014 09:24 PM |
The only reason this error would show, in this instance, would be because of what Absurdism said.
I threw together a GUI to test the kick part of your script, and I didn't encounter the error that you have. |
|
|
| Report Abuse |
|
|
|
| 23 Jan 2014 10:43 PM |
l = script.Parent.LevelBox p = script.Parent.playerbox s = script.Parent.submit k = script.Parent.kick c = script.Parent.coinbox k2 = script.Parent.kill player = game.Players.LocalPlayer if player.Name == "dom2d2" then l.Visible = true p.Visible = true s.Visible = true k.Visible = true c.Visible = true k2.Visible = true else if player.Name ~= "dom2d2" then l.Visible = false p.Visible = false s.Visible = false k.Visible = false c.Visible = false k2.Visible = false end end s.MouseButton1Click:connect(function() playername = p.Text level = l.Text coins = c.Text game.Players[playername].leaderstats.Level.Value = level game.Players[playername].leaderstats.Coins.Value = coins end) k2.MouseButton1Click:connect(function() playername = p.Text game.Players[playername].Character.Humanoid.Health = 0 end) k.MouseButton1Click:connect(function() playername = p.Text for i, v in pairs(game.Players:GetPlayers()) do if v.Name == playername then v:Kick(); end end end) |
|
|
| Report Abuse |
|
|
dom99
|
  |
| Joined: 20 May 2008 |
| Total Posts: 524 |
|
| |
|