I was trying to update a value in my script using a textbox for a min and max id, this an example of the min id. In the output it only prints the inital value of the textbox and not the updated value. Is there any way for this value to update correctly to the main script?
LocalScript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent3 = ReplicatedStorage:WaitForChild("RemoteEvent3")
local text = script.Parent:WaitForChild("Frame2"):WaitForChild("MINID")
text:GetPropertyChangedSignal("Text"):Connect(function()
remoteEvent3:FireServer()
end)
Script:
local startamount = 1
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent3 = ReplicatedStorage:WaitForChild("RemoteEvent3")
remoteEvent3.OnServerEvent:Connect(function(player)
local gui2 = player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("Frame2")
startamount = gui2:WaitForChild("MINID").Text
print("bro")
print(startamount)
end)