HUNGRY:3 Posted June 5, 2015 Share Posted June 5, 2015 hello i've a problem i've created an object but.... i can go inside it how can i fix that? Link to comment
Walid Posted June 5, 2015 Share Posted June 5, 2015 hello i've a problem i've created an object but.... i can go inside it how can i fix that? use setElementCollisionsEnabled() Link to comment
HUNGRY:3 Posted June 5, 2015 Author Share Posted June 5, 2015 not working but have a look at my script function base() if source == GUIEditor.button[1] then local x, y, z = getElementPosition(localPlayer) base = createObject(8240, x , y +5 , z +5 ) setObjectScale(base, 0.5) baseCol = createColSphere(x , y +5, z +5) attachElements(baseCol, base, 0, 0, 0) end end addEventHandler("onClientGUIClick", root, base) Link to comment
Walid Posted June 5, 2015 Share Posted June 5, 2015 (edited) ??? lol did you try it because i can't see the function in your code. Edited June 5, 2015 by Guest Link to comment
HUNGRY:3 Posted June 5, 2015 Author Share Posted June 5, 2015 yeah i removed it i did setElementCollisionsEnabled(base, true) but didn't work.. Link to comment
Walid Posted June 5, 2015 Share Posted June 5, 2015 that's because you changed the visible size of the object. try this -- Client side function base() if source == GUIEditor.button[1] then triggerServerEvent("eventName",localPlayer) end end addEventHandler("onClientGUIClick", root, base) -- Server side function functionName() local x, y, z = getElementPosition(source) local base = createObject(8240, x , y +5 , z +5 ) baseCol = createColSphere(x , y +5, z +5) attachElements(baseCol, base, 0, 0, 0) if base then setObjectScale(base, 0.5) setElementCollisionsEnabled(base, true) end end addEvent("eventName",true) addEventHandler("eventName",root,functionName) Link to comment
Walid Posted June 5, 2015 Share Posted June 5, 2015 not working What do you mean by "i can go inside it" , post SS here. Link to comment
Incama Posted June 6, 2015 Share Posted June 6, 2015 Probably the base object does not have a collision by default, you need to recreate a col for it manualy. 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