I an trying to fetch the text value and send it to the RemoteFunction, The local script cannot fetch the text value for some reason. Code:
local des = script.Parent.Parent.Destination.Text
local des = script.Parent.Parent.Destination.Text
local gate = script.Parent.Parent.Gate.Text
local flight = script.Parent.Parent.Flight.Text
local tim = script.Parent.Parent.Time.Text.Value
script.Parent.MouseButton1Down:Connect(function()
print(des.. gate.. flight.. tim)
game.ReplicatedStorage.ManualCheckIn.CheckInInfo:InvokeServer(des,gate,flight,tim)
end)
When you’re declaring the variables for des, gate, etc. you’re storing the current text rather than a reference to a property. Try removing the .Text from the end and then adding it back when you are invoking the server. Pretty sure the same thing goes for Value. Also, is there any reason you’re using a RemoteFunction? If you’re not using it to have the server return a value you’d be best to use a RemoteEvent.
local des = script.Parent.Parent.Destination;
local gate = script.Parent.Parent.Gate;
local flight = script.Parent.Parent.Flight;
local tim = script.Parent.Parent.Time.Text;
script.Parent.MouseButton1Down:Connect(function()
game.ReplicatedStorage.ManualCheckIn.CheckInInfo:InvokeServer(des.Text,gate.Text,flight.Text,tim.Value)
end)