I have a motor script for my boat here. There are three different motors that tilt up the three engines on the boat at the click of a gui. The script with Misc.M works but all the scripts with Misc.B or Misc.C do not work. The script called Motors itself creates a new motor at the point of the three bricks labeled M,B,C in the whale model. But for the 2 scripts that dont work containing B,C it claims that B,C aren’t valid member s of the “Misc” Model. As you can see in Explorer, B and C are both named properly in the Misc Model. Any help??
Can you send the screenshot with the error please?
Try to use names with at least 2 and more characters, because as i remember this caused me problems as well
Ill try but the one labeled M works
came up with the same error, just with a longer variable
That’s rly strange tbh, maybe you can try various methods of finding B and C? Like findfirstchild and etc
Hey i think i know the solution, you can do it like that:
local modelB = car:WaitForChild(“B”)
– do the same thing with C
(If that won’t work i’d curse on the roblox engine)
Also try to use :Connect instead of :connect
Edit: Small tip with boolvalues - You can just do else instead of elseif
im not a very expirienced lua coder, where would you put local modelB:WaitForChild(“B”) /C
and thanks ill make some changes tomorrow
1 Like
Above all the functions (trhtychrs)
local carSeat = script.Parent.Parent.Parent.CarSeat.Value
local car = carSeat.Parent.Parent
local addons = car.Addons.OutboardAddon.Outboard1
script.Parent.MouseButton1Down:connect(function()
if car.Trim.Value == false then
addons.Outboard.Parts.E1.Transparency = 1
addons.Outboard.Parts.E2.Transparency = 1
addons.Outboard.Parts.E3.Transparency = 1
addons.Outboard.Parts.E4.Transparency = 1
addons.Propeller.Parts.Prop.Transparency = 1
car.Misc.B.E1.Transparency = 0
car.Misc.B.E2.Transparency = 0
car.Misc.B.E3.Transparency = 0
car.Misc.B.E4.Transparency = 0
car.Misc.B.Prop.Transparency = 0
car.Misc.B.SS.Motor.DesiredAngle = .7
car.Trim.Value = true
script.Parent.Text = “Trim Down”
elseif car.Trim.Value == true then
car.Misc.B.SS.Motor.DesiredAngle = 0
wait(2.5)
addons.Outboard.Parts.E1.Transparency = 0
addons.Outboard.Parts.E2.Transparency = 0
addons.Outboard.Parts.E4.Transparency = 0
addons.Outboard.Parts.E3.Transparency = 0
addons.Propeller.Parts.Prop.Transparency = 0
car.Misc.B.E1.Transparency = 1
car.Misc.B.E2.Transparency = 1
car.Misc.B.E3.Transparency = 1
car.Misc.B.E4.Transparency = 1
car.Misc.B.Prop.Transparency = 1
car.Trim.Value = false
script.Parent.Text = “Trim Up”
end
end)
think you could help me out in where it goes?
Just add it at the very top, that’s all
figured it out, script wasnt parenting correctly due to being in the same button gui
1 Like
Also mark it as a solution
Trhtydamchrs