robloxapp-20200306-2126373.wmv (1,7 MB)
Hi there.
I need help with the door. I want to make the door works when you click it and opens smoothly. I tried to make a script, but it didn’t work.
This is the script:
local bodythrust = script.Parent.BodyThrust
local clickdetector = script.Parent.ClickDetector
clickdetector.MouseClick:Connect(function()
if bodythrust.Force == Vector3.new(0, 0, 0)then
bodythrust.Force = Vector3.new(0, 0, -600)
clickdetector.MaxActivationDistance = 0
script.Parent.Anchored = false
wait(1.5)
clickdetector.MaxActivationDistance = 32
script.Parent.Anchored = true
else
bodythrust.Force = Vector3.new(0, 0, 0)
clickdetector.MaxActivationDistance = 0
script.Parent.Anchored = false
wait(1.5)
clickdetector.MaxActivationDistance = 32
script.Parent.Anchored = true
end
end)
I await your prompt responses.
Thanks!
PD. I’m working on a new showcase!