I can create a door but as it opens it just hangs and u need to push it that it goes up again like the script is working but the door is moving for some secs and then stops only at the 2nd time it gets opened.
The script works still but the question is: How do I create a door that moves smooth and does NOT hang and CanCollide = true. If someone knows how to a BIG thx will be spoken!
local door = script.Parent.Parent:WaitForChild("Door") local bodv = door:WaitForChild("BodyVelocity") local Open = Instance.new("Sound", door) Open.SoundId = "rbxassetid://130794579" local Close = Instance.new("Sound", door) Close.SoundId = "rbxassetid://130794614" script.Parent.Touched:connect(function(hit) if hit ~= nil then if hit.Parent ~= nil then if hit.Parent:FindFirstChild("Humanoid") then if hit.Parent:FindFirstChild("Head") then if hit.Parent.Humanoid.Health > 0 then if game.Players:GetPlayerFromCharacter(hit.Parent) then local debounce = script.Parent.Parent.debounce.Value if not debounce then script.Parent.Parent.debounce.Value = true door.Anchored = false bodv.Velocity = Vector3.new(0,4,0) Open:Play() wait(6) bodv.Velocity = Vector3.new(0,-4,0) Close:Play() wait(6) bodv.Velocity = Vector3.new(0,0,0) door.Anchored = true wait(2) script.Parent.Parent.debounce.Value = false end end end end end end end end)
Why are you adding all these if statements you don't even need the if statement for the health
And what i recommend doing is doing a for loop for rotation. So something like this
for i = 0, 100, 1 do wait(0.1) script.Parent.Rotation = i end
1) it'll look veryyy smooth 2) it's efficient
**Ugh? Maybe provide the script you're using **
Have a read of this document