mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 06:41:55 +00:00
remove switch check
This commit is contained in:
@@ -80,24 +80,22 @@ local function SwitchAnimation(EnabledState: boolean, LightProperties: LightProp
|
||||
local Switch = LightProperties.Switch :: BasePart
|
||||
local Prompt = LightProperties.Prompt :: ProximityPrompt
|
||||
|
||||
if Switch then
|
||||
if EnabledState then
|
||||
local Tween = LightSwitchTween:Start(Switch, {
|
||||
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),0)+Vector3.new(0,.15,0)
|
||||
})
|
||||
Tween.Completed:Once(function()
|
||||
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
||||
Prompt.ActionText = "Toggle Off"
|
||||
end)
|
||||
else
|
||||
local Tween = LightSwitchTween:Start(Switch, {
|
||||
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),math.rad(70))-Vector3.new(0,.15,0)
|
||||
})
|
||||
Tween.Completed:Once(function()
|
||||
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
||||
Prompt.ActionText = "Toggle On"
|
||||
end)
|
||||
end
|
||||
if EnabledState then
|
||||
local Tween = LightSwitchTween:Start(Switch, {
|
||||
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),0)+Vector3.new(0,.15,0)
|
||||
})
|
||||
Tween.Completed:Once(function()
|
||||
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
||||
Prompt.ActionText = "Toggle Off"
|
||||
end)
|
||||
else
|
||||
local Tween = LightSwitchTween:Start(Switch, {
|
||||
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),math.rad(70))-Vector3.new(0,.15,0)
|
||||
})
|
||||
Tween.Completed:Once(function()
|
||||
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
||||
Prompt.ActionText = "Toggle On"
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user