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 » Scripters
Home Search
 

Re: Help with this script is very much wanted111

Previous Thread :: Next Thread 
1000knives is online. 1000knives
Joined: 29 Sep 2012
Total Posts: 341
22 Sep 2017 10:36 AM
So here's what I have so far :


wait(1)
for i,v in pairs(game.Players:GetChildren()) do
local o = Instance.new("TextButton")
o.Parent = v.PlayerGui.ScreenGui.Frame
o.Name = i..v.Name.."'s nametag"
o.Text = i..". "..v.Name
o.BorderSizePixel = 0
o.Position = UDim2.new(0, 0, 0.216, 0)
o.Size = UDim2.new(0, 290, 0, 50)
o.TextScaled = true
o.MouseButton1Down:connect(function()
v.Character.Humanoid.Health = 0
end)

end

So, it's making the new button, but only for the local player. So there is only one button being made, even when there are multiple players in the server. I need it so that once a player joins there will be a new button with the same function, in a new position(preferably under the first players button). Any help is much appreciated!
Report Abuse
Minimarshmallo is not online. Minimarshmallo
Joined: 12 Apr 2016
Total Posts: 242
22 Sep 2017 10:41 AM
either

Game.Players.PlayerAdded:connect(function(player)

end)

or

workspace.ChildAdded:connect(function(child)
if game.Players:GetPlayerFromCharacter(child) then

end
end)

tbh i never worked out the different of the outcome of the two
Report Abuse
Minimarshmallo is not online. Minimarshmallo
Joined: 12 Apr 2016
Total Posts: 242
22 Sep 2017 10:45 AM
forgot a few things lol
make a list of all the buttons

local ButtonList = {}

every time a player is added and the button is made

ButtonList[#ButtonList] = Button

then for the next button

local ButtonPos = (50 * ToNumber(#ButtonList)) + 5 * (ToNumber(#ButtonList))

idk really im just thinking
Report Abuse
1000knives is online. 1000knives
Joined: 29 Sep 2012
Total Posts: 341
22 Sep 2017 10:49 AM
Trying to put this together right now.



seems difficult e.e
Report Abuse
Minimarshmallo is not online. Minimarshmallo
Joined: 12 Apr 2016
Total Posts: 242
22 Sep 2017 10:55 AM
Only takes an hour or two don't worry
Report Abuse
1000knives is online. 1000knives
Joined: 29 Sep 2012
Total Posts: 341
22 Sep 2017 11:01 AM
It's saying : PlayerGui is not a valid member of Player. I've also put a wait, but this still persists.
Report Abuse
santi_23456 is not online. santi_23456
Joined: 04 Aug 2017
Total Posts: 2
22 Sep 2017 11:03 AM
grasias
Report Abuse
1000knives is online. 1000knives
Joined: 29 Sep 2012
Total Posts: 341
22 Sep 2017 11:05 AM
Why am I making this harder than it is. I suck at scripting lol
Report Abuse
Minimarshmallo is not online. Minimarshmallo
Joined: 12 Apr 2016
Total Posts: 242
22 Sep 2017 11:08 AM
should be a simple error in your hierarchy spelling
FIND IT OR FACE THE WRATH OF THE OUTPUT BAR
Report Abuse
1000knives is online. 1000knives
Joined: 29 Sep 2012
Total Posts: 341
22 Sep 2017 11:11 AM
D:
Report Abuse
1000knives is online. 1000knives
Joined: 29 Sep 2012
Total Posts: 341
22 Sep 2017 11:24 AM
the problem is that it isn't making a button for each player skreee i'm so frustrated
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