mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
Control doors on each floor WIP
This commit is contained in:
@@ -22,7 +22,6 @@ function Doors.constructor(ElevatorBox: BasePart, ElevatorDoor1: BasePart, Eleva
|
||||
type DoorSensors = {
|
||||
[string]: BasePart
|
||||
}
|
||||
|
||||
local DoorTween1 = Tween.constructor(nil, ElevatorDoor1)
|
||||
local DoorTween2 = Tween.constructor(nil, ElevatorDoor2)
|
||||
local DoorSensor: DoorSensors = {
|
||||
@@ -57,23 +56,22 @@ local opening_speed = Doors.ElevatorDoorTime/1.4285714285714286
|
||||
local sensor_opening_speed = Doors.ElevatorDoorTime/2.5
|
||||
|
||||
local function DoorsAnimationFloor(floor: number, opening: boolean?, activated_via_censor: boolean?, TweenTime: number): (Tween, Tween)
|
||||
local DoorTween1 = Tween.constructor(nil, Floor10_Door1)
|
||||
local DoorTween2 = Tween.constructor(nil, Floor10_Door2)
|
||||
|
||||
local DoorTween1 = Tween.constructor(TweenInfo.new(
|
||||
TweenTime,
|
||||
activated_via_censor and Enum.EasingStyle.Linear or Doors.ElevatorDoorStyle,
|
||||
Enum.EasingDirection.InOut
|
||||
), Floor10_Door1)
|
||||
local DoorTween2 = Tween.constructor(TweenInfo.new(
|
||||
TweenTime,
|
||||
activated_via_censor and Enum.EasingStyle.Linear or Doors.ElevatorDoorStyle,
|
||||
Enum.EasingDirection.InOut
|
||||
), Floor10_Door2)
|
||||
local Door1Tween_Floor: Tween = Floor10_Door1:Start(nil, {
|
||||
Position = opening and init_closed_door1 or init_opened_door1
|
||||
}, TweenInfo.new(
|
||||
TweenTime,
|
||||
activated_via_censor and Enum.EasingStyle.Linear or Doors.ElevatorDoorStyle,
|
||||
Enum.EasingDirection.InOut
|
||||
))
|
||||
})
|
||||
local Door2Tween_Floor: Tween = Floor10_Door2:Start(nil, {
|
||||
Position = opening and init_closed_door1 or init_opened_door1
|
||||
}, TweenInfo.new(
|
||||
TweenTime,
|
||||
activated_via_censor and Enum.EasingStyle.Linear or Doors.ElevatorDoorStyle,
|
||||
Enum.EasingDirection.InOut
|
||||
))
|
||||
})
|
||||
|
||||
return Door1Tween_Floor, Door2Tween_Floor
|
||||
end
|
||||
|
||||
@@ -33,9 +33,9 @@ local function GoTo_Level(requested_level: number)
|
||||
end
|
||||
end
|
||||
|
||||
while true do
|
||||
task.wait(2)
|
||||
ElevatorDoors:Opening(true)
|
||||
task.wait(2)
|
||||
ElevatorDoors:Opening(false)
|
||||
end
|
||||
-- while true do
|
||||
-- task.wait(2)
|
||||
-- ElevatorDoors:Opening(true)
|
||||
-- task.wait(2)
|
||||
-- ElevatorDoors:Opening(false)
|
||||
-- end
|
||||
@@ -57,6 +57,7 @@ function StudioEntities.indexAll(enabled: boolean): Entities
|
||||
|
||||
if Item:IsA("BasePart") then
|
||||
Item.CanTouch = false --Do micro optimizations
|
||||
Item.Locked = true
|
||||
|
||||
--Security from exploiters
|
||||
if not Item.Anchored and table.find(CS:GetTags(Item), "ServerGuard_Physics") then
|
||||
|
||||
Reference in New Issue
Block a user