Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a proper boat script?

Asked by 6 years ago

I tried to make a boat script with a vehicle seat, but it's not working, nor is it even printing anything. I've had this issue with scripts in the past, it doesn't work, gives no errors and it won't print ANYTHING.

print("setup started") --wont print 
local hull = script.Parent
local bp = script.Parent:FindFirstChild("BodyPosition")
bp.Position = Vector3.new(hull.Position.X,game.Workspace.Spawn.Water.Position.Y+1,hull.Position.Z)
bp.MaxForce = Vector3.new(1e8,1e8,1e8)
VS = script.Parent.Parent.VehicleSeat
local speed = 0
bv = script.Parent.BV
print("setup complete") --also wont print

while true do
    print("ran") --wont print either

        if speed < VS.MaxSpeed and speed > -VS.MaxSpeed then
        speed = speed + (1*VS.Throttle)
        end

    bv.Velocity = hull.CFrame.lookVector * 1e4 * speed
    bp.Position = Vector3.new(hull.Position.X,game.Workspace.Spawn.Water.Position.Y+1,hull.Position.Z)

end

It's not setting the bodyposition or the bodyvelocity and I have no way of checking if speed is increasing because of the broken print(), any idea what's wrong here?

0
since first print wont print then the script could be disabled lol  Godlydeathdragon 227 — 6y
0
the script is enabled Professor_Boxtrot 136 — 6y

Answer this question