Hello,
I am trying to make so what a player buts in a textbox will come to a value but its not working You can find it on line; 3. script.Parent.mainFrame.Reward.MoneyToGet.Value = script.Parent.Bet.Bet.Text
Script,
script.Parent.Bet.Conrim.MouseButton1Click:Connect(function() script.Parent.mainFrame.Reward.MoneyToGet.Value = script.Parent.Bet.Bet.Text script.Parent.Bet.Visible = true local WinningColor = math.random(1,3) if WinningColor == 1 then for i = 1,3 do script.Parent.mainFrame.Green.BackgroundTransparency = 0.6 script.Parent.mainFrame.Black.BackgroundTransparency = 0.6 wait(.3) script.Parent.mainFrame.Red.BackgroundTransparency = 0.6 script.Parent.mainFrame.Black.BackgroundTransparency = 0.6 script.Parent.mainFrame.Green.BackgroundTransparency = 0 wait(.3) script.Parent.mainFrame.Green.BackgroundTransparency = 0.6 script.Parent.mainFrame.Red.BackgroundTransparency = 0.6 script.Parent.mainFrame.Black.BackgroundTransparency = 0 wait(.3) script.Parent.mainFrame.Green.BackgroundTransparency = 0.6 script.Parent.mainFrame.Black.BackgroundTransparency = 0.6 script.Parent.mainFrame.Red.BackgroundTransparency = 0 wait(.3) end end
MoneyToGet
is an IntValue
or a NumberValue
, this will not work. You'll need to tonumber
the Text
.
script.Parent.Bet.Conrim.MouseButton1Click:Connect(function() local success, msg = pcall(function() script.Parent.mainFrame.Reward.MoneyToGet.Value = tonumber(script.Parent.Bet.Bet.Text) end) end)