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?:
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