Below is an example of what I’m attempting to achieve:
This is what I have:
So far, it uses a generic Mouse.Hit.p movement mixed with BodyVelocity and BodyGyro - How can I adjust this to tilt depending on what side of the screen the Mouse is on?
while System do wait()
if Pilot ~= nil then
if _index["Output"].Value == "Idle" then
_index["BodyGyro"].CFrame = CFrame.new(_index["Exterior"]["Base"].CFrame.p, Mouse.Hit.p)
if isMouseDown then
_index["BodyVelocity"].Velocity = _index["Exterior"]["Base"].CFrame.LookVector * Speed
else
_index["BodyVelocity"].Velocity = _index["Exterior"]["Base"].CFrame.LookVector * Speed
end
end
else
isMouseDown = false
break
end
if Pilot ~= nil then
if isMouseDown then
if Speed < 50 then
Speed = Speed + 1
end
else
if Speed > 0 then
Speed = Speed - 1
end
end
end
end
Hmmm, I don’t really know how to do it, but good news, there are a lot of other devs who also don’t know how to do it. Here are some posts that I found about this, hope they help: