In my left 4 dead, for the finale I have players surviving on a rooftop and they need to survive for 2 minutes before the helicopter arrives, when the helicopter arrives I want them to be teleported when they click the helicopter but its not working, can someone help?
What else would I have to put on here to make it work?
function(Onclick) if game.Workspace.Helicopter.ClickDetector.MouseClick=true game:GetService('TeleportService')
end
local TeleportService = game:GetService("TeleportService") local PlaceID = 1818 local function MouseClick(Player) if Player then -- Not needed, just like it to be clean. TeleportService:Teleport(PlaceID, Player) end end script.Parent.ClickDetector.MouseClick:Connect(MouseClick)
Here's the script.
It's parented to a part with a ClickDetector in it.