My Boolean based character design system does not work?
Ok basicly i'm creating a game that has a customisation feature, I want users to be able to outfit their characters and only be able to choose one item at a time. I want this to add to a "Total price" i have included a screen shot so you get the general idea
https://gyazo.com/b55da258104fe4baf7eba969473e9160
When they click an item it replaces the item on the right, I've managed to do this visually. But i would like the items
3rd Item in the box.
01 | LA 1 = script.Parent.Parent.Parent.LegButton.LA 1 |
02 | LA 2 = script.Parent.Parent.Parent.LegButton.LA 2 |
03 | LA 3 = script.Parent.Parent.Parent.LegButton.LA 3 |
04 | placeholder = script.Parent.Parent.Parent.LegButton.placeholder |
05 | LA 1 Value = script.Parent.Parent.Parent.Parent.OutfitPriceFrame.totalPrice.LA 1 |
06 | LA 2 Value = script.Parent.Parent.Parent.Parent.OutfitPriceFrame.totalPrice.LA 2 |
07 | LA 3 Value = script.Parent.Parent.Parent.Parent.OutfitPriceFrame.totalPrice.LA 3 |
11 | script.Parent.MouseButton 1 Click:connect ( function () |
13 | playername = script.Parent.Parent.Parent.Parent.Parent.Parent.Name |
14 | player = Workspace:FindFirstChild( "" ..playername.. "" ) |
20 | script.Parent.MouseButton 1 Click:connect ( function () |
26 | LA 2 Value.Value = false |
27 | LA 2 Value.Value = false |
30 | placeholder.Visible = false |
Now i want the LAValue's to change a separate intbool value which i have attached a screenshot of
https://gyazo.com/ffa76b15135d290383958da3c7649f59
But the boolean values don't change when i try them in testing. This next script is supposed to add one value to a VALUE int
01 | LA 1 = script.Parent.LA 1. Value |
02 | LA 2 = script.Parent.LA 2. Value |
03 | LA 3 = script.Parent.LA 3. Value |
07 | if script.Parent.LA 1. value = = true then |
09 | script.Parent.TOTAL.Value = script.Parent.TOTAL.Value + 130 |
11 | script.Parent.TOTAL.Value = 0 |
13 | if script.Parent.LA 2. Value = = true then |
14 | script.Parent.TOTAL.Value = script.Parent.TOTAL.Value + 190 |
16 | script.Parent.TOTAL.Value = 0 |
18 | if script.Parent.LA 3. Value = = true then |
19 | script.Parent.TOTAL.Value = script.Parent.TOTAL.Value + 220 |
21 | script.Parent.TOTAL.Value = 0 |
And then this last bit of code is supposed to display on the text label but it just breaks, I have tried work arounds. but with no luck. Any help and advice would be great.
1 | game.StarterGui.MainMenu.OutfitPriceFrame.totalPrice.TOTAL.Changed ( function () |
2 | script.Parent.Parent.totalPrice.Text = script.Parent.TOTAL.Value |
I'm very new to LUA but i know a few minor coding languages.