Alright, I know this isn't all based around scripting, but I wanna make a door that tweens, and NOT have it clip the door frame, that's all really. Here's my code:
local B = script.Parent.goto_pos
local tweenService = game:GetService("TweenService")
local part = script.Parent
local phase = false
local tweeningInformation = TweenInfo.new(
--Tween Properties.
3, -- Length
Enum.EasingStyle.Quint, -- Easing style of the TweenInfo
Enum.EasingDirection.In, -- Easing direction of the TweenInfo
0, -- Number of times the tween will repeat
false, -- Should the tween repeat?
2 -- Delay between each tween
)
local partProperties = {
Orientation = Vector3.new(0,-135,0);
Position = Vector3.new(1.195, 4.32, 24.275);
}
local Tween = tweenService:Create(part,tweeningInformation,partProperties)
local partProperties2 = {
Orientation = Vector3.new(0, 0, 0);
Position = Vector3.new(4.605, 4.32, 21.655);
}
local Tween2 = tweenService:Create(part,tweeningInformation,partProperties2)
--Serverside part for door tween, yeah.
--Stuffs and services.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local revent = ReplicatedStorage.DoorEvent
local door = script.Parent
local function test()
if phase == false then
Tween:Play()
phase = true
else
Tween2:Play()
phase = false
end
end
revent.OnServerEvent:Connect(test)
Yeah, that's all, thanks.
