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.
LA1 = script.Parent.Parent.Parent.LegButton.LA1 LA2 = script.Parent.Parent.Parent.LegButton.LA2 LA3 = script.Parent.Parent.Parent.LegButton.LA3 placeholder = script.Parent.Parent.Parent.LegButton.placeholder LA1Value = script.Parent.Parent.Parent.Parent.OutfitPriceFrame.totalPrice.LA1 LA2Value = script.Parent.Parent.Parent.Parent.OutfitPriceFrame.totalPrice.LA2 LA3Value = script.Parent.Parent.Parent.Parent.OutfitPriceFrame.totalPrice.LA3 script.Parent.MouseButton1Click:connect (function () playername = script.Parent.Parent.Parent.Parent.Parent.Parent.Name player = Workspace:FindFirstChild(""..playername.."") if player ~= nil then player:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=479112778" end end) script.Parent.MouseButton1Click:connect (function () LA2.Visible = false LA1.Visible = false LA3.Visible = true LA2Value.Value = false LA2Value.Value = false LA3Value.Value = true placeholder.Visible = false end)
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
LA1 = script.Parent.LA1.Value LA2 = script.Parent.LA2.Value LA3 = script.Parent.LA3.Value while true do if script.Parent.LA1.value == true then script.Parent.TOTAL.Value = script.Parent.TOTAL.Value + 130 else script.Parent.TOTAL.Value = 0 end if script.Parent.LA2.Value == true then script.Parent.TOTAL.Value = script.Parent.TOTAL.Value + 190 else script.Parent.TOTAL.Value = 0 end if script.Parent.LA3.Value == true then script.Parent.TOTAL.Value = script.Parent.TOTAL.Value + 220 else script.Parent.TOTAL.Value = 0 end end
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.
game.StarterGui.MainMenu.OutfitPriceFrame.totalPrice.TOTAL.Changed (function() script.Parent.Parent.totalPrice.Text = script.Parent.TOTAL.Value end)
I'm very new to LUA but i know a few minor coding languages.