I'm trying to transfer a table through a function using arguments, but it says "22:51:19.339 - Unable to cast value to Object" This error occurs on line 9 of the script
In a script in Workspace:
_G.ArrestReason={"Test"} _G.ArrestTime={} _G.ArrestNum={} _G.ArrestOfficer={} ArrestsEvent=script:WaitForChild("TransferArrests") ArrestsEvent:FireClient(_G.ArrestReason, _G.ArrestTime, _G.ArrestNum, _G.ArrestOfficer)
In a local script:
EventHandler=game.Workspace:WaitForChild("RemoteEventHandler") TransArrest=EventHandler:WaitForChild("TransferArrests") TransArrest.OnClientEvent:connect(function(rsn, waitt, off, num) print("Invoked") print(rsn) _G.LocalArrestReason=rsn _G.LocalArrestTime=waitt _G.LocalArrestOfficer=off _G.LocalArrestNum=num end)
:FireClient()
takes a player object as its first argument. You'll have to specify the player. Obviously a table is definitely not a player object