#Cant walk through door
1 messages · Page 1 of 1 (latest)
Show script
local door = script.Parent
local prompt = door:FindFirstChild("ProximityPrompt")
local TweenService = game:GetService("TweenService")
local isOpen = false
local closedCFrame = door.CFrame
local openCFrame = closedCFrame * CFrame.Angles(0, math.rad(90), 0)
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
prompt.Triggered:Connect(function()
local goalCFrame = isOpen and closedCFrame or openCFrame
local tween = TweenService:Create(door, tweenInfo, {CFrame = goalCFrame})
tween:Play()
if not isOpen then
wait(0.5)
door.CanCollide = false
else
door.CanCollide = true
end
isOpen = not isOpen
end)
** You are now Level 1! **
that didnt work
what the fuck
you wouldn't need to change the cancollide
i think its all cuz u made the tween in a super werid way
yeah lol im kinda new so yeh