Hi! Making a plane where you press W to make it move forward and you use the mouse to make it look in different directions. So, I have to ask: How do I make it so that a localscript (aka my mousefollowing script thing) is disabled when your not sitting in the VehicleSeat, and it is enabled when I touch/sit in it.
No one is responding, so this topic is closed.
local plane = workspace.Model.PlaneBody
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local mouseActive = game.StarterPlayer.StarterPlayerScripts.FollowMouse.Disabled == false
mouseActive = true
if mouseActive == false then
mouse.Move:connect(function()
local mousePosition = mouse.Hit.p
plane.CFrame = CFrame.new(plane.CFrame.p,mousePosition)
end)
else
end
Thanks.