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: Kick is not a valid member of ScreenGUI?

Previous Thread :: Next Thread 
dom99 is not online. 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 is not online. 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 is not online. 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 is not online. Absurdism
Joined: 18 Jul 2013
Total Posts: 2568
23 Jan 2014 07:43 PM
Preferably get rid of the ScreenGui.
Report Abuse
dom99 is not online. 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 is not online. 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 is not online. dom99
Joined: 20 May 2008
Total Posts: 524
23 Jan 2014 07:55 PM
It's in starterGUI, not players.
Report Abuse
dom99 is not online. dom99
Joined: 20 May 2008
Total Posts: 524
23 Jan 2014 08:06 PM
Stupid ROBLOX.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
23 Jan 2014 08:08 PM
add 1 more parent (called it)
Report Abuse
dom99 is not online. 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 is not online. 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 is not online. dom99
Joined: 20 May 2008
Total Posts: 524
23 Jan 2014 09:12 PM
I still can't figure this out.
Report Abuse
DataStore is not online. 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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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 is not online. dom99
Joined: 20 May 2008
Total Posts: 524
24 Jan 2014 05:21 PM
Didn't fix my issue.
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