Hi!
This is my teleport script.
game.Workspace.Elevator1aTPPart.Touched:Connect(function(a)
local partParent = a.Parent
local humanoid = a.Parent:FindFirstChildWhichIsA("Humanoid")
print("Touched")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(a.Parent)
game:GetService("TeleportService"):TeleportAsync(tonumber(script.Parent:GetAttribute("ID")), player)
end
end)
The issue is, when I try to teleport, I get this error.
I think the issue may be in the attribute, but it’s a number.
Thanks for any help!