Make player sit in driverSeat when they spawn a ship

Hey! I’m making a ship simulator and I’ve made a very simple spawning system. The ship spawns fine, but i want the player to be teleported to the driverseat of the ship once they spawn it. Ill show the script that actually spawn the boat. It is a regular script inside of an image button.

script.Parent.MouseButton1Click:Connect(function(player)
	local ship = game.ServerStorage.Ships.Rusla.NKL27
	local clone = ship:Clone()
	clone.Parent = workspace
	
	script.Parent.Parent.Parent.Visible = false
	script.Parent.Parent.Parent.Parent.Parent.ClickDetector.MaxActivationDistance = 0
	wait(30)
	script.Parent.Parent.Parent.Parent.Parent.ClickDetector.MaxActivationDistance = 32
end)

image

The boat is directly inside of the boat model. The spawning works fine but i just wanted help in adding the feature where you are teleported and sat in the driverseat.

Any and all help is appreciated, thank you!

Could you try

clone.VehicleSeat:Sit(player.Character.Humanoid)

Once the ship has been cloned

One problem though… are you cloning the ship on the client (doing it on a LocalScript)?

1 Like

No, it’s in a normal script because I thought if it was in a LocalScript nobody else could see the boat had spawned

yes, good, since ui stuff is generally on a local script i thought you were spawning the boat on the client. but since you are using server for ui, you have to watch out because remember, everyone can see the stuff happening on the ui if its controlled on a server script