Galactix Posted July 9, 2018 Share Posted July 9, 2018 (edited) Hello, I have the Following issue: I tried to set a variable to a getLocalPlayer but it just keeps returning nil value, why? My script is clientside so this is not the problem local player = getLocalPlayer ( ) Edited July 9, 2018 by Galactix Link to comment
Moderators IIYAMA Posted July 9, 2018 Moderators Share Posted July 9, 2018 (edited) Maybe you have another function named getLocalPlayer? So many things can cause this. With the code you showed me is nothing wrong. How about you try to use the predefined variable localPlayer instead? (not a function) (If that one returns nil, than the script is being read as a server file) Edited July 9, 2018 by IIYAMA Link to comment
Galactix Posted July 9, 2018 Author Share Posted July 9, 2018 Now my getElementData just outputs Bad argument, expected element got nil when I write Quote local requestStatus = getElementData( localPlayer , "healrequest") Link to comment
Moderators IIYAMA Posted July 9, 2018 Moderators Share Posted July 9, 2018 39 minutes ago, IIYAMA said: (If that one returns nil, than the script is being read as a server file) So not clientside. 1 Link to comment
Galactix Posted July 9, 2018 Author Share Posted July 9, 2018 You were right; I actually got it working, thanks so much 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now