Raizel Posted June 23, 2023 Share Posted June 23, 2023 so i made this script that teleports u inside an interior when u enter a marker but it doesnt teleport u for some reason.. server : local e1 = createMarker(2105.47534, -1806.58765, 12.55469, "cylinder", 1.0, 255, 255, 255, 50) local e = createMarker(362.98032, -75.25889, 1000.50781, "cylinder", 1.0, 255, 255, 255, 50) setElementInterior(e, 10) -- INSIDE addEventHandler("onMarkerHit", e1, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 10) setElementPosition(hitElement, 365.33194, -73.90823, 1001.50781) end end ) -- OUTSIDE addEventHandler("onMarkerHit", e, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 0) setElementPosition(hitElement, 2100.90894, -1806.63440, 13.55469) end end ) Link to comment
βurak Posted June 23, 2023 Share Posted June 23, 2023 (edited) for some reason collision is not detected because the marker is small set the size of the marker to 1.5 to fix this issue or if you want to keep the marker small, create a colshape and reference the collision to the colshape local e1 = createMarker(2105.47534, -1806.58765, 12.55469, "cylinder", 1.5, 255, 255, 255, 50) local e = createMarker(362.98032, -75.25889, 1000.50781, "cylinder", 1.5, 255, 255, 255, 50) setElementInterior(e, 10) -- INSIDE addEventHandler("onMarkerHit", e1, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 10) setElementPosition(hitElement, 365.33194, -73.90823, 1001.50781) end end ) -- OUTSIDE addEventHandler("onMarkerHit", e, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 0) setElementPosition(hitElement, 2100.90894, -1806.63440, 13.55469) end end ) Edited June 23, 2023 by Burak5312 1 Link to comment
Raizel Posted June 23, 2023 Author Share Posted June 23, 2023 25 minutes ago, Burak5312 said: for some reason collision is not detected because the marker is small set the size of the marker to 1.5 to fix this issue or if you want to keep the marker small, create a colshape and reference the collision to the colshape local e1 = createMarker(2105.47534, -1806.58765, 12.55469, "cylinder", 1.5, 255, 255, 255, 50) local e = createMarker(362.98032, -75.25889, 1000.50781, "cylinder", 1.5, 255, 255, 255, 50) setElementInterior(e, 10) -- INSIDE addEventHandler("onMarkerHit", e1, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 10) setElementPosition(hitElement, 365.33194, -73.90823, 1001.50781) end end ) -- OUTSIDE addEventHandler("onMarkerHit", e, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 0) setElementPosition(hitElement, 2100.90894, -1806.63440, 13.55469) end end ) ahh thank u sm Link to comment
βurak Posted June 23, 2023 Share Posted June 23, 2023 (edited) You're welcome. please open more topics i would like to help you Edited June 23, 2023 by Burak5312 Link to comment
Raizel Posted June 23, 2023 Author Share Posted June 23, 2023 33 minutes ago, Burak5312 said: You're welcome. please open more topics i would like to help you thank you, i'll open more topics when i run into some problems 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