function onTouched(hit) game.Workspace.Player.Torso.CFrame = CFrame.new(Vector3.new(90, 50, 90)) end script.Parent.Touched:connect(onTouched)
Is the script i use but it first wont work and secondly im not even sure how to make it that if it does teleport them to that seat then if someone else tries to then it teleports them to another asvalible seat and not that one till its free. Im kinda new to scripting lvl 0.5. Help please
Hey man, that script won't work online either, you need to get the touching player's character so:
local seat_part = game.Workspace.Seat --get the seat function onTouched(hit) if hit.Parent:FindFirstChild("Humanoid") then --check if the part is part of the humanoid's body local character = hit.Parent --character (player model on the workspace) local humanoid = character:WaitForChild("Humanoid") --humanoid found inside the player's character humanoid:MoveTo(seat_part.Position) --function of the humanoid end end script.Parent.Touched:connect(onTouched)
humanoid api: http://wiki.roblox.com/index.php?title=API:Class/Humanoid
And thats it, hope Î helped!