Copy salient and essential scripts and models from Plane Building Roblox
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
local module = {}
|
||||
|
||||
function module.new(this,hinge,context)
|
||||
this.hinge = _G.GetInstance(hinge,"HingeConstraint")
|
||||
local function update()
|
||||
if this.limited then this.hinge.LimitsEnabled = this.limited.Value end
|
||||
if this.lower then this.hinge.LowerAngle = this.lower.Value end
|
||||
if this.upper then this.hinge.UpperAngle = this.upper.Value end
|
||||
end
|
||||
if _G.IsServer then
|
||||
this.limited = hinge:FindFirstChild("Limited")
|
||||
this.upper = hinge:FindFirstChild("Upper")
|
||||
this.lower = hinge:FindFirstChild("Lower")
|
||||
if this.limited then this.limited.Changed:Connect(update) end
|
||||
if this.lower then this.lower.Changed:Connect(update) end
|
||||
if this.upper then this.upper.Changed:Connect(update) end
|
||||
end
|
||||
return this
|
||||
end
|
||||
|
||||
module.manifest = {
|
||||
"FlatServoRoll",
|
||||
"FlatServoPitch",
|
||||
"Servo",
|
||||
"ControlSheet",
|
||||
"NanoControlSheet",
|
||||
"MetalServo",
|
||||
"Spinner",
|
||||
"Hinge",
|
||||
"Rotator",
|
||||
"RotatorPlate"
|
||||
}
|
||||
|
||||
return module
|
||||
Reference in New Issue
Block a user