How do i accept InvokeServer

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    i want to accept InvokeServer in a remote function
  2. What is the issue? Include screenshots / videos if possible!
    i don’t know how
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
if script.Parent.Activated then

Use OnServerInvoke

can i use if and then in this?

OnServerInvoke is a Event

   -- Do what ever you wish here

According to the OnServerInvoke reference…

“Binding a function to OnServerInvoke is done with the assignment operator = , and not with an event. That is because OnServerInvoke is a callback and expects a function to be assigned to it. When the RemoteFunction is invoked, it will execute the function that was assigned to the onInvoke function.”

That means, use this code:

RemoteFunction.OnServerInvoke = function()
    -- Place code here