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 qq

Previous Thread :: Next Thread 
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
08 Feb 2015 01:03 AM
function Click(mouse)
for i,label in pairs(PlayerList:GetChildren()) do
if label then
if string.find(label.Name,"Slot") then
target1.Value = label.Text
end
end
end
end

script.Parent.PlayerList.label.MouseButton1Down:connect(Click)


How would I make it that if you click a button named Slot? I can't find a way, since there is Slot1, Slot2,Slot3 ... etc..

qq
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
08 Feb 2015 01:05 AM
q2
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
08 Feb 2015 01:14 AM
findfirstchild, string.sub(1,4)
Report Abuse
drager980 is online. drager980
Joined: 25 May 2009
Total Posts: 13385
08 Feb 2015 01:24 AM
to translate what ruinable said:
function Click(mouse)
for i,label in pairs(PlayerList:GetChildren()) do
if label and string.sub(label.Name,1,4) == "Slot" then
target1.Value = label.Text
end
end
end

script.Parent.PlayerList.label.MouseButton1Down:connect(Click)



AND THE TIGER GOES ROAR
Report Abuse
Pragmatist is not online. Pragmatist
Joined: 17 Oct 2008
Total Posts: 16170
08 Feb 2015 01:25 AM
function Click(mouse)
for i, label in pairs(PlayerList:GetChildren()) do
if label then
if label.Name:match("^" .. "Slot") then
target1.Value = label.Text
end
end
end
end

script.Parent.PlayerList.label.MouseButton1Down:connect(Click)
Report Abuse
iamsmartcookie is not online. iamsmartcookie
Joined: 18 Aug 2012
Total Posts: 2738
08 Feb 2015 01:25 AM
script.Parent.PlayerList.label.MouseButton1Down:connect(Click)

instead of label that needs to be slot, but idk how to make it so any slot is clicked
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
08 Feb 2015 01:26 AM
I'm confused about what you're trying to do, so either try prags script or talk on skype in the morning.
Report Abuse
Pragmatist is not online. Pragmatist
Joined: 17 Oct 2008
Total Posts: 16170
08 Feb 2015 01:30 AM
for i, v in pairs(PlayerList:GetChildren()) do
if v.Name:match("^" .. "Slot") then
v.MouseButton1Down:connect(function()
target1.Value = v.Text
end)
end
end

?
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