So recently I have been making a camping like game. Everything is go well expect for one thing, the user wont teleport when the vehicle moves into the brick that is meant to teleport them. And because the user is non collide able when sitting in a moving car.
Is there anyway of getting around this because I've tried killing the user when they hit the part, but that didn't work because the user is non collide able with anything whilst sitting.
The script I'm using for the car to move is this if you would like to know.
Car = script.Parent while true do wait(55) for i = 1,100 do Car:TranslateBy(Vector3.new(2,0,0)) wait() end for i = 1,100 do Car:TranslateBy(Vector3.new(-2,0,0)) wait() end end
And the code for the user teleporting when they should collide with the brick.
function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then game:GetService("TeleportService"):Teleport(4450695917,player) --replace the numbers with your place id end end script.Parent.Touched:connect(onTouched)