Hello, I am trying to create “Locker Doors” on a Fire Engine but they open into the middle instead of at the top,
They work in workspace but not in the body of A-Chassis
My Script is:
local TweenService = game:GetService("TweenService")
local part = script.Parent.lockerClosed
local DeltaSize = 6.8
local speed = 1.8
local tweenInfo = TweenInfo.new(speed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
on = false
script.Parent.lockerClosed.cd.MouseClick:Connect(function()
if on == false then
local props = {
Size = part.Size - Vector3.FromAxis(Enum.Axis.Y)*DeltaSize,
Position = part.Position + Vector3.FromNormalId(Enum.NormalId.Top)*DeltaSize/2
}
local tween = TweenService:Create(part,tweenInfo,props)
tween:Play()
script.Parent.open:Play()
script.Parent.lockerClosed.cd.MaxActivationDistance = 0
wait(1.65)
script.Parent.lockerClosed.Transparency = 1
script.Parent.lockerOpen.Transparency = 0
script.Parent.lockerOpen.cd.MaxActivationDistance = 10
on = true
end
end)