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
 

Can somebody fix this script?

Previous Thread :: Next Thread 
Airstruct is not online. Airstruct
Joined: 13 Oct 2016
Total Posts: 73
19 Nov 2017 06:52 PM
I have an IntValue labeled as (Period), the IntValue is controlled by 5 buttons (for the quarters) that control the value of them (when click 1st, it changes to 1, when click 2nd, it changes to 2...when click OT, it changed to 5).

I need a script that would change the script's parent (text) to 1st when the value of the IntValue would be 1, and so on up until OT when the value of the IntValue would be 5.

How would I do that?
Report Abuse
Voxxie is online. Voxxie
Joined: 27 Aug 2006
Total Posts: 325
19 Nov 2017 06:54 PM
I answered this in your other post :^)

local quarter = script.Parent.Quarter;
local periodVal = workspace:WaitForChild("GameValues").Period;

periodVal.Changed:Connect(function()
if periodVal.Value == 1 then
quarter.Text = "1st";
elseif periodVal.Value == 2 then
quarter.Text = "2nd";
-- etc etc etc
end);




-- Or you can use the method below


local quarter = script.Parent.Quarter;
local periodVal = workspace:WaitForChild("GameValues").Period;
periods = {"1st", "2nd", "3rd", "4th", "OT"};

periodVal.Changed:Connect(function()
quarter.Text = periods[periodVal.Value];
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