Jump to content

[HELP] Clientside Local Player


ReZurrecti0n

Recommended Posts

Posted

I just discovered that client side events will trigger for everyone rather than just the one who triggers the event. So I need some way to check and run the code for only the one who triggered it. I'm currently having issues with one player pressing the F1 key (OnClientKey) to open a menu (custom PlayerMenu()) and everyone is getting that menu when it is only meant for the player who triggers it. How would I work this out to make it so only the triggering player gets the menu? Check using localPlayer? But what would I check against? How exactly does it all work?

Posted

It could possibly have been how I was using all my triggerClientEvent functions, the very first "optional" argument was missing, therefore triggering the client events for everyone...

However, its difficult to test since I need more than myself to confirm I've even fixed this issue...

  • Moderators
Posted
2 hours ago, ReZurrecti0n said:

the very first "optional" argument was missing

That is mostlikely the issue.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...