Jump to content

Variables


Drakath

Recommended Posts

No. When the script starts localPlayer is a 'userdata' that points to the local player. When you define lPlayer, it's now a 'userdata' variable that points to the local player.

Before localPlayer variable was predefined, most people did this at the start of their client scripts:

localPlayer = getLocalPlayer() 

See, the "system" doesn't need to check for the local player, as the local player will never change. Client scripts run on the client, so localPlayer doesn't change, there's no "looking" involved.

Link to comment

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...