So I want to teleport the player FULLY from a server script with teleport data, and then when they join access that data FULLY from another server script. I don’t need remotes firing or a client script. Will that be possible to do?
You can use the server script to change the CFrame of the
HumanoidRootPart
to whereever you want your player to be.
What’s your reasoning for avoiding using remoteevents and remotefunctions? Generally it looks like the only provided methods and events are localplayer only.
I have over 1,000 games that I’m teleporting to and they currently don’t have any remotes in them. that’s why I’m wondering if there might be a way to access teleportdata from purely a server script, and send it from a server script
I can ask around, but generally looking at getting teleportdata is not possible from the server only. In regards to managing a lot of places(I assume you’re using a universe with generated places), for future reference perhaps see about using packages to better manage your game’s code and assets across a larger assortment of places.
Really tough situation all around.
I have one Model that is synced to all 1,000+ places. Each place has a serverscript that loads that model. Would that assist in getting teleportdata from only the server script?
Yes I tried that. So basically what I’m doing is I have a table of around 700 integer values. I load those with a proxy and it takes very long. What I’m thinking is I can send that table like this
game:GetService("TeleportService"):Teleport(game.PlaceId,player,teleportData)
and I want to reaccess it upon joining the same game that way it doesn’t need to be loaded again. I just don’t know how to go about it
:GetJoinData() returns a dictionary of values including the teleportdata the player was teleported in with. Using it on a player after they’ve joined(usually with PlayerAdded) should return a list of different values, you specifically want to check the “TeleportData” key in that return.
Edit: You should be able to access this like so: player:GetJoinData().TeleportData
Got it, that helped me access. Just need help now on how to initiate a teleport with the teleportData that has the table
Edit: Tried this but it says, “Unable to cast value to objects”
badgeData = badge; --badge is a table of values
}
local teleportOptions = Instance.new("TeleportOptions")
teleportOptions:SetTeleportData(teleportData)
game:GetService("TeleportService"):TeleportAsync(game.PlaceId,p, teleportOptions)```
Second argument takes an array, usually used for sending multiple players at once. Try setting p
to {p}
instead
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.