#A Remotefunction does not returning Value

1 messages · Page 1 of 1 (latest)

late portal
#

https://devforum.roblox.com/t/a-remotefunction-does-not-returning-value/4123486/4
I wrote it down on the Dev Forum.
Please let me know if you need any information

late portal
#

ok

shrewd temple
#

did you add print statement each time before you return

late portal
#

yes

shrewd temple
#

alr

#

then what about the receiving end

#

it might because the receiving is not setup properly in the first place

late portal
#

local ServerResponse = MaratangRemote:InvokeServer(
self.Tool,
self.IntersectedInstance,
self.Ghost.Handle.CFrame,
self.TableCode
)
--nothing prints after this
print(ServerResponse)

#

I wrote like this

shrewd temple
#

ok

#

let me see

shrewd temple
late portal
#

yes

shrewd temple
#

add a print statement after return true

#

also try to tidy your code its too nested

#

for example instead of doing if tool and tool.parent == plr.char then, you should do if not tool or tool.parent ~= plr.char then return false end

#
 if not tool or tool.parent ~= plr.char then return false end 
#

instead of

#
if tool and tool.parent == plr.char then 

end
late portal
#

oh ok
I'm changing my code

shrewd temple
#

alr

#

i just realized i said the same thing as what the guy said in the forum 💀

late portal
#

I thought it was the same person as you

somber shuttleBOT
#

studio** You are now Level 2! **studio

shrewd temple
#

did you tried the code someone wrote for you?

late portal
#

😱

shrewd temple
#

this guy

#

he wrote a whole renewed script for you lol

late portal
#

Oh, I just saw it

late portal
# shrewd temple

Error correction successful!!

Fixing the nested code allowed me to find where the error came from. Thank you