im trying to have a localscript attached to a UI thats trying to run a function to grab some data from a function, and it works perfectly - up until it actually invokes the server. both scripts seem to just stop, nothing having actually happened. here is the script:
the local script in the GUI:
local player = game.Players.LocalPlayer
local RemoteDataPass = game:GetService("ReplicatedFirst"):WaitForChild("RemoteDataPass")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local requestedstats = {"Str","End","Agi","Fin","Int","Will"}
local SignalPart = ReplicatedStorage.SignalParts:WaitForChild(player.Name.."'s SignalPart")
local requiredstats = {
Str = 0,
End = 0,
Agi = 0,
Fin = 0,
Int = 0,
Will = 0
}
print ("everything else finished")
requiredstats = RemoteDataPass:InvokeServer(requestedstats)
print ("the script is done")
and the server script being invoked (With irrelevant script omitted)
--some variables
function retrievestats (player,requestedstats)
print ("Script Invoked")
if player == localplayer then
print (localplayer.."'s Handler responding to request.")
for i = 1, #requestedstats do
local requestedstat = requestedstats[i]
ShuffleDictionary[requestedstat] = StatsDictionary[requestedstat]
end
return ShuffleDictionary
elseif player ~= localplayer then
print (localplayer.."'s Handler rejected request")
end
end
RemoteDataPass.OnServerInvoke = retrievestats
--other script
again, it just seems to brick itself. the print just before the invocation fires, then both scripts go dead. it never even invokes the function or even errors. just stops.
i feel like i run into these inexplicable errors every time i try to write some script. anytime i try to outhink whatever engine bug or untraceable script error i just run into three more. it is extremely discouraging. any and all advice would be greatly appreciated.

2 comments
is RemoteDataPass a remote function that you created via a script or is it a pre-existing remote function that you placed in manually?
its placed in by me and exists when the game starts, if you are referring to the object itself.