Hello, I added cars to my new game below but there is a problem. When the player chooses to join the round, it does not teleport them if they are inside the vehicle. Instead, the vehicle breaks apart with the player inside. I am currently using A-Chassis for my car. Could anyone help with teleporting a player inside a car without it (the car) breaking?
Thanks in advance.
(1) Temerity - New Roadway! - Roblox
Teleport script:
local teleport = game.ReplicatedStorage.Events.JoinGame:InvokeClient(player)
if teleport == "true" then
print("found teleport")
if game.Workspace:FindFirstChild(player.Name.."'s Car") then
print("found players car.")
player.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
game.Workspace[player.Name .. "'s Car"].DriveSeat.Disabled = true
player.Character:WaitForChild("HumanoidRootPart").CFrame = player.Character:WaitForChild("HumanoidRootPart").CFrame + Vector3.new(0, 5, 0)
wait(0.2)
game.Workspace[player.Name .. "'s Car"]:Destroy()
end
player.Character:WaitForChild("HumanoidRootPart").CFrame = player.Character:WaitForChild("HumanoidRootPart").CFrame + Vector3.new(0, 5, 0)
wait(0.2)
player.Character:WaitForChild("HumanoidRootPart").CFrame = tiles[math.random(1, #tiles)].CFrame + Vector3.new(0, 10, 0)
table.insert(playersInGame, player)
player.Character.Humanoid.WalkSpeed = 0
else
print("They did not want to join.")
end
Are you certain the Models you put in your game haven’t been messed with?
Also, try copying your teleport script here but put three backwards ticks ``` at the beginning and end of the script section so it stays formatted properly.
I have tried to teleport port them a little before the main telport, it still does not work.
Nobody can help if you don’t post the script…
It’s like saying “Help me, my car won’t start.” and not giving any other information than that. Nobody can help if you don’t give us more information.
Here are the issues:
-
I asked if you were certain your models haven’t been messed with (that they aren’t the cause of the problem since people like to do this to models in the toolbox) and you didn’t answer that question.
-
Copy your script here with the instructions in my first post.
-
When you say you have tried to teleport “them” are you talking about the players or the cars? You need to be more specific so we understand what you are referring to.
It is hard enough trying to figure out solutions to issues on forum posts, try to make it as easy as possible for us to help you.
This is scripting support. If you do not have a script to show us, then you shouldn’t be posting here.
I am heartily sorry for the lack of information. I will take all of your complaints into consideration next time I post. I am sorry. Let me make this right.
- There are no models anyone could have messed up.
- Here is the script:
local teleport = game.ReplicatedStorage.Events.JoinGame:InvokeClient(player)
if teleport == "true" then
print("found teleport")
if game.Workspace:FindFirstChild(player.Name.."'s Car") then
print("found players car.")
player.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
game.Workspace[player.Name .. "'s Car"].DriveSeat.Disabled = true
player.Character:WaitForChild("HumanoidRootPart").CFrame = player.Character:WaitForChild("HumanoidRootPart").CFrame + Vector3.new(0, 5, 0)
wait(0.2)
game.Workspace[player.Name .. "'s Car"]:Destroy()
end
player.Character:WaitForChild("HumanoidRootPart").CFrame = player.Character:WaitForChild("HumanoidRootPart").CFrame + Vector3.new(0, 5, 0)
wait(0.2)
player.Character:WaitForChild("HumanoidRootPart").CFrame = tiles[math.random(1, #tiles)].CFrame + Vector3.new(0, 10, 0)
table.insert(playersInGame, player)
player.Character.Humanoid.WalkSpeed = 0
else
print("They did not want to join.")
end
- When I said them, yes, it meant the player.
1 Like
By the way, I fixed the problem as you may see in the given script.