Creating a SCP: Roleplay door

So today I was playing “SCP Roleplay” and I really liked the line that pops up whenever you’re close to a door.

(Here’s an image for reference)

The lines seems to be connected to the player and to the keycard reader thing. Even when you move your character, the line stays connected until you’re too far.

Do any of yall know what this could be?

I believe they create a part or a beam or whatever the line is classified as, and position the origin to be your RootPart. They then use CFrame.lookAt() to make the part look at the keycard reader. After that they find the distance between the two parts (your rootpart and the keycard reader) by subtracting the positions of each (rootpart first) and finding the magnitude of subtracted positions. They multiply the size on the Z vector by the distance. Run this in a loop.

1 Like