To start of, I am new to scripting, and not sure what is happening. I have a WW2 Plane Mesh I inserted. The script lets you click on the canopy, it then moves from its "start position" to the new given position. The "canopy" is the part of the plane that slides back to let you sit down. When I tested it, it collided with another part of the mesh and got pushed/moved up. When you click it, it stays at the same height, and moves back to the "start position." I tried turning off CanCollide and nothing seems to work. I cant figure it out.
Is there any way to make it so it goes to the set location without being raised, or hitting other meshes/parts?
open = true
Part = script.Parent
Model = game.Workspace.Model.Canopy
Part.ClickDetector.MouseClick:Connect(function()
if open==true
then
open=false
Model:MoveTo(Vector3.new(3.741, 11.572, -5.2))
else
open=true
Model:MoveTo(Vector3.new(0.741, 11.562, -5.2))
end
end)
https://gyazo.com/95ff30699370657aa7ebfb3914d90420 https://gyazo.com/1903bfe718cce649ff96239ec167941f https://gyazo.com/2d1d7339732c387074c159367858ed47
Thanks, GIennMiller.

1 comment
if open then open = not open