this script should teleport all players in the server to the place id after everything fires.
local lighting = game.Lighting
local tweenservice = game:GetService("TweenService")
local tpservice = game:GetService("TeleportService")
local fountainCount = 0
script.Parent.ChildAdded:Connect(function()
local darktween = tweenservice:Create(lighting,TweenInfo.new(2),{ExposureCompensation = lighting.ExposureCompensation - 1.5})
darktween:Play()
fountainCount += 1
if fountainCount >= 5 then
task.wait(3)
tpservice:TeleportPartyAsync(131898370913947,game.Players:GetPlayers(),nil,game.ReplicatedStorage.darkandevil)
end
end)
when used, i get the error in the title.
my place access is set to fully open and all teleports inside are allowed.
what is the problem
The issue is likely the teleportData argument. You are passing game.ReplicatedStorage.darkandevil as the fourth argument, which is meant for a table of data, not an Instance. If you want to pass data, use a plain table instead.
The API is returning PlaceHasNoPublishedVersion for that ID. If you’re sure it’s published, double check that the Place ID in your script is actually correct and not just a Universe ID or something else.