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: This is repeating: (.Change Function)

Previous Thread :: Next Thread 
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
11 Sep 2014 03:37 PM
ThePlayer.PlayerGui.Main.Teams.Changed:connect(function (change)
if game.Players.LocalPlayer.TeamColor == BrickColor.new("Bright violet") or game.Players.LocalPlayer.TeamColor == BrickColor.new("Bright yellow") then return end
if #t > 0 then
for i = 1,#t do
local base = Instance.new("Frame")
for _,lol in pairs (game.Lighting.MainGamePortions.Acronyms:GetChildren()) do
if lol.Value == t[i] then
base.Name = lol.Name
end
end
base.Size = UDim2.new(1,0,.05,0)
base.Position = UDim2.new(0,0,calculateYPosition(),10)
base.BackgroundTransparency = 1
base.Parent = ThePlayer.PlayerGui.Main.Teams
local a = ThePlayer.PlayerGui.Main.Example:Clone()
for _,lold in pairs (game.Lighting.MainGamePortions.Acronyms:GetChildren()) do
if lold.Value == t[i] then
a.Text = lold.Name
end
end
a.Visible = true
a.TextColor = game.Lighting.Teams:FindFirstChild(t[i]).TeamColor
a.Parent = base
a.MouseButton1Down:connect(function ()
game.Players.LocalPlayer.TeamColor = a.TextColor
game.Players.LocalPlayer.PlayerGui.Money.TeamVal.Value = a.Text
game.Players.LocalPlayer.PlayerGui.Money.Money.Value = findMoney(t[i])
game.Players.LocalPlayer:LoadCharacter()
end)
end
end
end)


It clones the buttons lots of times.
Report Abuse
SparkleOff is not online. SparkleOff
Joined: 07 Jan 2014
Total Posts: 346
11 Sep 2014 03:40 PM
I know why because it tweens the position but how can i make it where it checks the visible property?
Report Abuse
Bobobob12 is not online. Bobobob12
Joined: 23 Jan 2008
Total Posts: 5350
11 Sep 2014 03:43 PM
if not changed == "Visible" then return end
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