I have a WWI battleground in a map that I want you to be able to get gear from a base camp in a separate place. I don't know how to make you keep your gear or team, though. Or if that's even possible. If it is, I'd be super grateful to anyone who could tell me how it's possible.
Here's the place teleportation script I've got so far:
PlaceId = 20158067 Part = script.Parent Players = Game:GetService("Players") Part.Touched:connect(function(Hit) Player = Players:GetPlayerFromCharacter(Hit.Parent) if Player then Game:GetService("TeleportService"):Teleport(PlaceId, Player.Character) end end)
Thinking about it, I could just have it be from the same place if I have to, but it wouldn't be as pretty to try and use separate effects. I'd also like to have the opportunity to add separate battle zones later, but that's not as important as getting this one map to work.
Thanks! -Bubblehead12
No, this is only possible thru data store I believe and only able if they are in the same universe(Excuse me if im wrong about data store, it might also be data persistence) but here
local datastore = game:GetService("DataStoreService"):GetDataStore("DataStoreName") local values = {"Level", Exp,} function onjoin(player) for i = 1, #values do value = Instance.new("StringValue") value.Value = datastore:GetAsync(player.Name..values[i]) value.Parent = player end end function onleave(player) for i = 1, #values do if player:FindFirstChild(values[i])~= nil then datastore:SetAsync(player.Name..values[i], player:FindFirstChild(values[i]).Value) end game.Players.PlayerAdded:connect(onjoin) game.Players.PlayerRemoving:connect(onleave)
Also put a :SetAsync() in the button script to ensure it save when you leave.
wiki.roblox.com