So I wanted to make like a Gui that would give stuff if you are in a particular group. Since I am using local Script for Gui's, I decided to use Remote Function to get if a player is in group or not since that feature only works in server script.
The thing is that my conditional statement does not seem to be working. The Remote Function instead of returning true or false, it seems to return nil.
Have I somehow messed up writing the parameter?
-- Server Script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteFunctions = ReplicatedStorage:WaitForChild("RemoteFunctions")
local GetPlayerGroupInfo = RemoteFunctions:WaitForChild("GetPlayerGroupInfo")
local function GetPlayerGroupData (player)
return player:IsInGroup(0000000) -- I just wrote it like that :P
end
GetPlayerGroupInfo.OnServerInvoke = GetPlayerGroupData
-- Client Script
GetPlayerGroupInfo:InvokeServer()
local GetPlayerValue = GetPlayerGroupInfo
if GetPlayerValue == true then
print("Local Player in Group")
elseif GetPlayerValue == false then
print("Local Player not in Group")
else
print("Not Working")
end
It seems to be printing the else statement; Not Working. What am I doing wrong here????

1 comment
Oh Interesting. I did check if I was setting the getplayervalue to an object but my knowledge is pretty limited and I failed to pick that up. Thanks a lot!