Error: ServerScriptService.DataChangeSelfCheckIn:12: attempt to index local 'DTBoxS' (a nil value)

FireEvent: (Local Script)

local SelfCheckInEvent = game.ReplicatedStorage.SelfCheckInSystem.Events:WaitForChild("EditData")
local SumbitSCI = script.Parent.SelfCheckInDataMenu.Sumbit
local DTBoxS = script.Parent.SelfCheckInDataMenu.DepartureTimeBox
local DBoxS = script.Parent.SelfCheckInDataMenu.DestinationBox
local FBoxS = script.Parent.SelfCheckInDataMenu.FlightBox
local GBoxS = script.Parent.SelfCheckInDataMenu.GateBox
local PBoxS = script.Parent.SelfCheckInDataMenu.PlaneBox

SumbitSCI.MouseButton1Click:Connect(function()
	SelfCheckInEvent:FireServer(DTBoxS,DBoxS,FBoxS,GBoxS,PBoxS)
end)

OnServerEvent: (Script)

local EventSelfCheckIn = game.ReplicatedStorage.SelfCheckInSystem.Events.EditData

local Data = game.ReplicatedStorage.SelfCheckInSystem.Data
local DepartureTime = Data.DepartureTime
local Destination = Data.Destination
local Flight = Data.Flight
local Gate = Data.Gate
local Plane = Data.Plane


EventSelfCheckIn.OnServerEvent:Connect(function(Player,DTBoxS,DBoxS,FBoxS,GBoxS,PBoxS)
    DepartureTime.Value = DTBoxS.Text
	Destination.Value = DBoxS.Text
	Flight.Value = FBoxS.Text
	Gate.Value = GBoxS.Text
	Plane.Value = PBoxS.Text
end)

Explorer:

https://imgur.com/a/jLF9Xvn

2 comments

0

Your gui is local, it doesn't replicate to the server because the game is FE

0

Agreed. Try doing a RemoteFunction from client to server if you want to update the text in the Gui.