Jump to content

[HELP] Object and Cursor


WelCome

Recommended Posts

Hello, I have a problem, when I move the cursor, the object becomes invisible

gate = Object(1337,712.61853, 659.00409, 9.94867)

addEventHandler('onClientRender',root,function()
if not isCursorShowing() then return end
local _,_,wx,wy,wz = getCursorPosition()
gate:setPosition(wx,wy,wz)
end)

 

Link to comment

function attached to onClientRender event won't work if you used return at least once

gate = Object(1337,712.61853, 659.00409, 9.94867)

addEventHandler('onClientRender',root,function()
	if isCursorShowing() then
		local _,_,wx,wy,wz = getCursorPosition()
		gate:setPosition(wx,wy,wz)
	end
end)

@WelCome

Edited by JeViCo
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...