Problems with Variables?

Alright so earlier I was coding some anti-cheat for a game I’m working on and I’m using a RemoteFunction and a client code handler so whenever I playtest the error that comes up is ‘Function is not a valid member of Script “Players.HaappyNewYears.Backpack.StarPlatinum”’ the line that is causing the problem is just ‘local Event = script.Parent.Function’ and heres the order https://i.gyazo.com/288480563b82f1dba532d4473f19a7a6.png

Anyone understand whats going on here?

If a script is a localscript, try:

  • Adding a wait(0.5)
  • Using Waitforchild
local Event = script.Parent.Function or script.Parent:WaitForChild("Function")
1 Like