I'm making a city simulator game but the car I'm scripting using the MoveTo method theres a way it has to turn how to make it "Turn" Using rotate? or is it not possible?:
I know you can rotate a part but can you rotate an entire model?
3 answers
There is currently no built-in method of rotating models, but studying scripts such as CmdUtil that allow you to rotate models from Studio might be a step in the right direction.
http://www.roblox.com/CmdUtl-Command-Utility-v3-0-0-item?id=56988233
Hey, sry about not Commenting, I cant Comment for some Stupid Reason -_- This:
w = script.Parent.Parent.Parent.Doors.Door1
d = script.Parent.Parent.Parent.Doors.Door2
for r = 1,30 do
wait()
for r,p in pairs(w:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,0,-3) end end
for r,p in pairs(d:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,0,3) end end
end
Should be:
w = script.Parent.Parent.Parent.Doors.Door1
d = script.Parent.Parent.Parent.Doors.Door2
for r = 1,30 do
wait()
for r,p in pairs(w:GetChildren()) do if (p.className == "Part" or className == "Wedge" or className == "Truss" or className == "Seat") then p.CFrame = p.CFrame - Vector3.new(0,0,-3) end end
for r,p in pairs(d:GetChildren()) do if (p.className == "Part" or className == "Wedge" or className == "Truss" or className == "Seat") then p.CFrame = p.CFrame - Vector3.new(0,0,3) end end
end
every time className == has to be repeated (from my experience, and again, sry for not Commenting, my Comments are Disabled for some Stupid Reason...
You have to define the models and then get the children then Cframe the children like so:
w = script.Parent.Parent.Parent.Doors.Door1
d = script.Parent.Parent.Parent.Doors.Door2
for r = 1,30 do
wait()
for r,p in pairs(w:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,0,-3) end end
for r,p in pairs(d:GetChildren()) do if (p.className == "Part" or "Wedge" or "Truss" or "Seat") then p.CFrame = p.CFrame - Vector3.new(0,0,3) end end
end
1 comment
As KAAK82 points out, your conditions are WRONG. You must explicitly state the condition. The condition will always evaluate to true. Furthermore, USE THE METHOD :IsA("BasePart"), DO NOT DO THIS CLASSNAME COMPARISON
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Use :IsA("BasePart") instead. It's much shorter and robust to changes in the future, and includes CornerWedgePart, SpawnLocation, &c. Also, it's "WedgePart" not "Wedge".
I know, I just Commented on TheJeterMan's Answer...