Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How to make a player sit on different seats like in those camping games?

Asked by 4 years ago

Hey there!

So i was wondering how people make a script where you get in a bus teleported to a different seat so everyone gets in a seat.

Could any1 help me out?

1
Not a request site RealTinCan 217 — 4y
0
wdym ReallyUnikatni 68 — 4y
0
Yep really isnt a request site voidofdeathfire 148 — 4y

2 answers

Log in to vote
0
Answered by
Syclya 224 Moderation Voter
4 years ago

Seat:Sit() is something you'd want to look up. Here it is: https://developer.roblox.com/en-us/api-reference/function/Seat/Sit

Ad
Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
4 years ago

That has a simple thing make like this:

The first step, Do 4 seats. Seats can be found in the workspace. Make the seats like this: ? (Each square means a seat)

Second, Put a brick middle top to those seats, and name that brick becomes 'Brick1'.

Third, make a brick next to your spawn, name the part 'TeleToBrick1'.

Finally, insert a script into your 'TeleToBrick1'. Here's the full script:

script.Parent.Touched:connect(function(hit) 
 if hit.Parent:FindFirstChild('Humanoid') then 
 local COORDINATION HERE = game.Workspace.Brick1.Position -- Gets the Brick1's position.


---------The part properties---------
 COORDINATION HERE.Transparency = 1
 COORDINATION HERE.CanCollide = false
 COORDINATION HERE.Anchored = true
---------The part properties---------


  hit.Parent.Head.CFrame = CFrame.new(COORDINATION HERE) -- This make the people teleport to 'COORDINATION HERE'. That's 'Brick1'.
 end
end)

Answer this question