remove switch check

This commit is contained in:
2024-04-29 03:09:24 -04:00
parent 0fa0e2b8f6
commit bfab50ead3

View File

@@ -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