You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Rotate opening door -
What is the issue? Include screenshots / videos if possible!
Seems to be detecting the player hitting the door but not the actual anim -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
all the parts are welded and there doesn’t seem to be any errors
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local doormodel = game.Workspace.Door1
local leftdoor = doormodel.Left
local sensor1 = doormodel.Sensor
local TS = game:GetService("TweenService")
local LD = leftdoor.PrimaryPart
-- Variables ^^
local LeftDoorInfo = TweenInfo.new()
local LeftDoorSwing = TS:Create(LD, LeftDoorInfo, {
CFrame = LD.CFrame * CFrame.Angles(0, math.rad(95), 0)
})
sensor1.Touched:Connect(function(hit)
if not hit.Name == "Humanoid" then return end
local char = hit.Parent
wait(1)
print("player touching door") -- this prints but it spam prints (could be the problem but idk)
LeftDoorSwing:Play()
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
