Hey. I have following Problem. I did a LocalScript, which teleports the player to a mat. Now, it does not teleport the player to the seat.
Thats the script:
--Teleport to mats
local function TeleportToMat()
local player = game.Players.LocalPlayer
local char = player.Character
if not char or not char.Parent then
char = player.CharacterAdded:wait()
end
char.Position:SetPrimaryPartCFrame(workspace.Mat1.Position)
end
local RemoteEvent = game.ReplicatedStorage.RemoteFunction
RemoteEvent.OnClientEvent:Connect(TeleportToMat())

5 comments
Hm, it still does not work, I even tried making a new transparent part, still doesnt work.
I edited it, check it out
I dont know what is wrong, but it still doesnt work. I dont get an error too.
I'm assuming it has something to do with the whole ' if not char or not char.Parent then' thing, 1 sec
try it now