InvokeServer error in my game

Hello,I am superkingburger1456

I am creating a simulator game on roblox studio.I came across an error in my LocalScript. Here is the script.

The script is returning an error

Please do help me, I am still a beginner to scripting,It would be great if you will help me,

Thanks

.OnServerInvoke is the event used for the Server detecting remote functions being invoked, local scripts use .OnClientInvoke (should not be used often), I’m assuming you’re trying to use :InvokeServer()

2 Likes

You should be using

replicatedStorage.Remotes.Rebirth:InvokeServer()
3 Likes

They are correct, OnServerInvoke is the event that reacts to InvokeServer.

RemoteFunction (roblox.com) - You may want to read up on this too, as it has the information you may be looking for

1 Like

I tried that but its returning the same error

If it returns the same error then you haven’t tried it.

Not the same error,sorry it is returning this:

Please do respond it would be grateful

can you send the script that this error is coming from in lua form (```lua) so it’s easier for us to check through the script

The error means in the leaderboard there is no such thing as Strength meaning it doesn’t exist.
Show us the server script. And have you ever created the value of Strength?

I dont know how to send scroll-able script,so can you please tell me how to

Make sure your remote is a remote function.
image

Yes it is a remote function and I renamed it as Rebirth but its parent is “Remotes” and its ClassName is RemoteFunction

Uhm no I did not create the value of strength.If I have to where should I put it?

How to upload scroll-able scripts in dev forum

.```
Your code here.

.```
Remove the dots.