mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51: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 Switch = LightProperties.Switch :: BasePart
|
||||||
local Prompt = LightProperties.Prompt :: ProximityPrompt
|
local Prompt = LightProperties.Prompt :: ProximityPrompt
|
||||||
|
|
||||||
if Switch then
|
if EnabledState then
|
||||||
if EnabledState then
|
local Tween = LightSwitchTween:Start(Switch, {
|
||||||
local Tween = LightSwitchTween:Start(Switch, {
|
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),0)+Vector3.new(0,.15,0)
|
||||||
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),0)+Vector3.new(0,.15,0)
|
})
|
||||||
})
|
Tween.Completed:Once(function()
|
||||||
Tween.Completed:Once(function()
|
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
||||||
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
Prompt.ActionText = "Toggle Off"
|
||||||
Prompt.ActionText = "Toggle Off"
|
end)
|
||||||
end)
|
else
|
||||||
else
|
local Tween = LightSwitchTween:Start(Switch, {
|
||||||
local Tween = LightSwitchTween:Start(Switch, {
|
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),math.rad(70))-Vector3.new(0,.15,0)
|
||||||
CFrame = CFrame.new(Switch.Position)*CFrame.Angles(0,math.rad(90),math.rad(70))-Vector3.new(0,.15,0)
|
})
|
||||||
})
|
Tween.Completed:Once(function()
|
||||||
Tween.Completed:Once(function()
|
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
||||||
ToggleSwitchLight(EnabledState, LightProperties :: LightPropertiesSafe)
|
Prompt.ActionText = "Toggle On"
|
||||||
Prompt.ActionText = "Toggle On"
|
end)
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user