WezzarD Posted February 8, 2018 Share Posted February 8, 2018 I was creating a new game mode after I do all GUI I did this script Quote addEventHandler("onClientGUIClick",root, function () if source == ENTER1 then setElementPosition ( source, 1549.88953, -1685, 13 ) end end ) but when I click on "ENTER1" key it didn't respond. Link to comment
Mahlukat Posted February 8, 2018 Share Posted February 8, 2018 try this addEventHandler("onClientGUIClick",root, function () if source == ENTER1 then setElementPosition ( localPlayer, 1549.88953, -1685, 13 ) end end ) Link to comment
ÆBKV Posted February 8, 2018 Share Posted February 8, 2018 (edited) addEventHandler("onClientGUIClick",ENTER1, function() setElementPosition(localPlayer,1549.88953,-1685,13) end ) If you use source on "onClientGUIClick" it does get the gui element not the player so use always localPlayer on client-side scripts to get the player. Edited February 8, 2018 by ÆBKV Link to comment
URBAN Posted February 8, 2018 Share Posted February 8, 2018 (edited) Call it on server side if you call in client it wont sync dimension or interior Edited February 8, 2018 by URBAN 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