#Someone help me with sending teleport data
1 messages · Page 1 of 1 (latest)
Here is my server script when tping, under is my local script to get the data
local TeleportService = game:GetService("TeleportService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local data = TeleportService:GetLocalPlayerTeleportData()
print("Data should be under this")
print(data)
The local script above for data prints nil, how come? I have the correct attribute and everything but still no.
for _,player in pairs(playerTable) do
allPlayerData[player.Name] = player:GetAttribute("CurrentCharacter") --this line
RemoteEvents.MiscRemoteEvents["TeleportEvent(used when teleporting a player from the client)"]:FireClient(player,"Teleporting in progress")
player.Character.HumanoidRootPart.Anchored = false
print(player.Name.." has been welded")
local WeldConstraint = Instance.new("WeldConstraint")
WeldConstraint.Parent = Car
WeldConstraint.Part0 = Car
WeldConstraint.Part1 = player.Character:WaitForChild("HumanoidRootPart")
end
teleportOptions:SetTeleportData(allPlayerData) --this line
while true do
print("this ran")
task.wait(0.02)
if Car.CFrame.Z <= GoalPosition then break end
Car.CFrame = CFrame.new(Car.CFrame.Position - Vector3.new(0,0,1))
end
if not game:GetService("RunService"):IsStudio() then
TeleportService:TeleportToPrivateServer(placeID,PrivateReserveCode,playerTable,teleportOptions) --this line
Car.Position = CarOGPosition
Car.New_Project:Stop()
else
Car.Position = CarOGPosition
print("tpd all players")
Car.New_Project:Stop()
end
end
Script above, focus on comments lines (yes ik the ends are messed up, I copied a bit since the full one was too big)
I think you check and wait until the player character loaded before you the data sends
How your title of post is wrong prompt
?
Wdym
I can’t do that on the client
Well I did
he meant put the data variable above char variable i think
** You are now Level 12! **
my assumption btw
Alr well
remember just my assumption
Alr, well I still am confused
why