I’m trying to give people a gear if their teleport data said they do have it, but for some reason the teleport data won’t get sent.
Script where I send all players:
player.IsBeingTeleported.Value = true
local teleportOptions = Instance.new("TeleportOptions")
local teleportData = {
speedCoil = player.Gears.SpeedCoil.Value,
}
print(teleportData.speedCoil)
teleportOptions:SetTeleportData(teleportData)
remotes.ClientStatus:FireClient(player, "teleportUI", ReplicatedStorage.RLGLTeleport)
wait(1)
TeleportService:TeleportToPrivateServer(ChosenGamemode.Value, serverID, {player}, teleportOptions, ReplicatedStorage.RLGLTeleport)
Yes, it does print true at the print.
Script where I receive the player data in other place:
local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local approvedPlaceIds = {ids here}
local function isPlaceIdApproved(placeId)
for _, id in pairs(approvedPlaceIds) do
if id == placeId then
return true
end
end
return false
end
Players.PlayerAdded:Connect(function(player)
local joinData = player:GetJoinData()
if isPlaceIdApproved(joinData.SourcePlaceId) then
print("AAAAAA")
local teleportData = joinData.TeleportData
if teleportData then
print("e")
if teleportData.speedCoil == true then
print("yessir")
local speedCoil = ServerStorage["Speed Coil"]:Clone()
speedCoil.Parent = player.Backpack
end
end
end
end)
All it prints is the “AAAAAA”, but there it stops. Does it not send the data or what’s the problem?