Okay, so this title just gives it all away.
What I wanna achieve: To build a plane, or something that flies.
I’m a noob at scripting. I can only script if I’m following a tutorial or something like that. I’ve been trying to build a plane for a while, but I can’t seem to script and build one by myself (ya duh) and ALL the videos on YouTube say “use my kit” or uses some outdated coding, or even use free models!
I just need someone to explain what I would have to do to build a plane.
All I know is I need a VehicleSeat, and literally just a part to weld it to.
oh, and not forget the scripts.
Thanks.
PS: You can also link a tutorial in the comments that doesn’t use kits or free models or outdated coding.
PPS: Please don’t write code for me.
On player seat give player network ownership for best responsiveness with no lag (exploiter prone though worry about that later)
Apply BodyMover physics locally to make the plane fly.
The biggest step is step three what body movers to apply and that’s up to you to find out.
You could use a simple Body velocity to make the plane move in the direction of this velocity and BodyGyro to orientate accordingly.
Or you could simulate IRL physics and apply lift accordingly Unity is more advanced in this department with tutorialswell in general Unity will have more tutorials to achieve a game mechanic in general for most things on there worth checking out.
this is just my opinion: First unanchored all your plane part and then insert a vehicle seat and put it where ever you want, then weld it to your plane. you also need to weld all your plane part and group it if you want to. you can select all your plane part and go to the property and set the massless to true, this will make your plane model massless or light. to make the plane fly you can use body velocity to make the plane move forward and you can use body gyro or body angularvelocity to turn left or right, up and down. [put the those body mover in anywhere in the plane part that you want to put.
Been working for a hour or two after researching body velocity, which I didn’t do much…
My code is:
local plane = script.Parent.Parent
local planeBody = plane.Part
local planeSeat = plane.VehicleSeat
local playerFind = game:GetService(“Players”)
local character = playerFind:FindFirstChild()
local humanoid = character:WaitForChild(“Humanoid”)
local touchedSeat = humanoid.Touched.planeSeat
touchedSeat = false
local move = Vector3.BodyVelocity(0, 100, 0)
if touchedSeat == true then
end
The question is, is this a good-ish script? And IF it all (maybe?) is correct, how would I make it work?
Just give me advice.
Been working for another hour, this is my other script.
PS: Don’t know why there are spaces between the script.
PPS: Finally made a code block.
local plane = script.Parent.Parent
local planeBody = plane.PlaneBody
local planeSeat = plane.VehicleSeat
local playerFind = game:GetService("Players")
local player = playerFind:GetChildren()
local character = playerFind:FindFirstChild(player)
local humanoid = player.Child
local humanoidPartPart = Instance.new("Humanoid")
local touchedSeat = humanoidPartPart.Touched
touchedSeat = false
local move = script.Parent.BodyVelocity
local function onTouch(part)
touchedSeat.planeSeat = true
end
if touchedSeat == false then
planeBody.Anchored = false
planeSeat.Anchored = false
else
planeBody.Anchored = true
planeSeat.Anchored = true
end
onTouch.Touched:Connect(touchedSeat)
Enclose your code in a code block to structure it neatly and highlight keywords by using the backtick key on your keyboard (typically to the left of the key 1): `.