I'm trying to make a spaceship (but i'm testing with just a seat), when you sit in the spaceship, you can click in whatever place in the screen & the spaceship will look at the spot you clicked, i need help.
(btw if you played Moon Tycoon, and you have a spaceship, you know what i'm talking about.)
Here's the script i used in my place
local player
local mouse
local function onClicked()
script.Parent.CFrame = CFrame.new(script.Parent.Position, mouse.Hit.Position) --Script.Parent is the seat
end
script.Parent.Touched:connect(function(hit)
if hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name) then
player = game.Players:FindFirstChild(hit.Parent.Name)
mouse = player:GetMouse()
mouse.Button1Up:connect(onClicked)
end
end)
but it doesn't work!
if you have a better idea, or if you know what to do here, tell me plz! :c Please! If someone knows how to make the Moon Tycoon's Spaceship, TELL ME! ...or if you know how to edit the Personal Rocketship without all the Tool stuff, and making it just for a seat

4 comments
you don't put the script anywhere... I'm not giving you the script for the whole thing, I'm just giving a way you could do this.
oh ok
is there a way i can do this with a server script?
btw i think i'm gonna be using BodyGyro and BodyForce :/