This script is not working and I don’t know why, is anyone able to help?
local TeleportService = game:GetService(“TeleportService”)
local Place = (ID)
script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
TeleportService:Teleport(Place, player)
end
end)
the place id is where I’ve put ‘ID’, however I removed it and changed it to ‘ID’ for the sake of posting this.
Did this work for you? When I used my code earlier and went into a game it didn’t work and did not give me an error in the console either. I tried your code and it did the same.
It worked fine for me.
Where is the part in your explorer? Is your script a regular script or a local script?
Try adding a print after every line to see where the code stops.