I cannot test this because I can’t be bothered to painstakingly recreate every single instance your script tries to index, but, I can say from just examining the code that you have 2 main problems:
1: line 11 of the serverscript:
if contents:PermissionToSpin(player) then
return false
else
“if contents:PermissionToSpin(player) then” means that the InvokeServer will return false if permissionToSpin returns true.
2: line 156 of the localscript:
if not errorMessage then
errorMessage = contents.Messages.ServerError
end
errorMessage is always nil, because your InvokeServer does not return a tuple of spinDetails, errorMessage; infact it never returns a tuple at all, all it returns is “false” when you have permission to spin, hence why the if statement on line 155 of the localscript:
if not spinDetails then
is always true, followed by the “if not errorMessage then” also always being true because errorMessage is nil. Atleast, that’s my assumption after reading the code, as I said I can’t test anything so everything I just said is conjecture. Hope it still helps.