Hi, thanks for replying so soon.
I am looking for a way that I don’t use loops as I am making a sort of ‘interactable part’ where it checks if the player is near the part and then opens the gui. So I’d have a lot of these throughout my game for every interactable object. So if there is anyway I can not use a loop of some sort or a loop that doesn’t cause lag and that you can have many scripts of that would be awesome.
– Creative Side B
You dont need multiple scripts to control multiple interactable parts. You can store all of them in a table and use an ipairs loop, which wont cause a lot of lag, also, it will be in a single script.
Hello, thanks for replying, I have experimented with that in the past but it causes lag spikes making the frame rate very unstable.
Thankyou for the reply
I was thinking that but it would be hard to manage their different purposes and keycodes and the text that pops up like “Press E to enter garage”.
Thankyou for replying.
Also, as golden said, using UIS, keyCodes, and BillboardGuis is not a viable method of making interactable objects. ProximityPrompts are the best option for making something like interactable parts
Hang on, just did somethinking lol, I have houses loading in and cars, ect so I don’t want to create an update function or something everytime it’s loaded in. Thankyou for your help.