for some reason the server wont return a bool value or maybe the client isn't picking it up, please help. Btw i have left the rest of the code out because it is unnecessary and is hard to read.
Client:
Uis.InputBegan:Connect(function(inputObject)
if inputObject.KeyCode == Enum.KeyCode.E then
if mouse.Target ~= nil then
part = mouse.Target
part = part:FindFirstAncestorWhichIsA("Model")
if part then
local ig = reqGrab:InvokeServer(part) -- the remote function
if ig == true then -- the problem
print(123456)
isGrabbing = true
end
end
end
end
end)
Server:
function requestGrab(player, part)
if playerParts[part] ~= nil then return false end -- will not let code run if part is associated with a player,
if collectionService:HasTag(part, tag) then
local primaryPart = part:FindFirstChild("PrimaryPart")
if primaryPart then
playerParts[part] = player
applyConfig(part)
for i, v in pairs(part:GetChildren()) do
v:SetNetworkOwner(player)
end
print(part.Name .. " Successfully claimed!")
return true -- i want this value to be returned to the client side
end
end
end

3 comments
any output?
nope no errors and the print doesn't run
it is equal to nil