Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make parts act like they're welded without using welds? [closed]

Asked by 4 years ago

So I'm trying to make some welded parts move inside of a ViewportFrame, but i realised welds don't work outside of workspace, how would I use CFrames to make them act like they're welded?

Closed as off-topic by JesseSong

This question has been closed by our community as being off-topic from ROBLOX Lua Scripting.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
TGazza 1336 Moderation Voter
4 years ago
Edited 4 years ago

Not sure if this is what your asking but i have made a camera system that uses a ViewportFrame. the script simply clones what the camera sees and uses the viewportframe as a screen.

the code is as follows: It also might give you some idea on how to move something without using welds! :)

Code(LocalScript):

001local function CreateRegion3FromLocAndSize(PartBase,Offset, Size)
002    local SizeOffset = Size/2
003    local CF = PartBase.CFrame*Offset
004    local Point1 = (CF - SizeOffset).p
005    local Point2 = (CF + SizeOffset).p
006    return Region3.new(Point1, Point2)
007end
008 
009local RegionSize = Vector3.new(250,250,250)
010local Camera = workspace.CurrentCamera
011local Player = script.Parent.Parent
012local PlayerGui = Player.PlayerGui
013 
014local ScreenGui = (function()
015    local Screen_Name = "Camera View Port"
View all 117 lines...

just copy and paste that into a local script inside the PlayerStarterscripts and run the game to see the effect! :)

Ad