--localscript



print(script.Parent.Parent:GetFullName())

local ReplicatedStorage = game:GetService("ReplicatedStorage")
 
local remoteEvent = ReplicatedStorage:WaitForChild("changemoney")
local guiTextValue = script.Parent.Parent.Value


while true do
 	wait(1)

	print(guiTextValue)
	print("The value was", guiTextValue.Value)
	print(script.Parent.Parent.Parent.Money.Text)
	script.Parent.Parent.Parent.Money.Text = guiTextValue.Value
	print("The value is", guiTextValue.Value)
	print(guiTextValue:GetFullName())
end



-- Fire the remote event

script.Parent.MouseButton1Click:Connect(function() 
	local LOCALPLAYERBIDVALUE = script.Parent.Parent.Text
	guiTextValue = script.Parent.Parent.Value

	print("Sending ", guiTextValue.Value)
	remoteEvent:FireServer(LOCALPLAYERBIDVALUE,guiTextValue)

end)

this is my code to update guiTextValue every 1 second. the GuiTextValue changes every time the player enters an int value in the textBox and presses a textbutton.

This code is a local script inside that text button. Here is the output:

  Value
  The value was 0
  0
  The value is 0
  Players.QuantumxGeneral.PlayerGui.Auction.Frame.TextBox.Value

only this keeps on working. Why isn't the guiTextValue getting updated ? please help me

1 comment

0

maybe because guiTextValue.Value never changes?