Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Spawning a range for every player that joins?

Asked by 5 years ago

I'm making a farm game, and I'd like to make it so that when a player joins, their "range" spawns somewhere in the game. Since all the players spawn in the lobby, there is going to be a teleport button that can teleport the player to their range when they press the button. I'm not asking/requesting anything as I know this is not a request site. I'm simply asking for some guidance. Thanks!

--my sad attempt at a script

local player = game.Players.LocalPlayer
local range = game.ServerStorage.range
local teleb = game.StarterGui.Teleportbutton
local Teleport = "Player one's Range" ---- uhh idk how to make it name the range the name of the player who joined
    game.Players.PlayerAdded:connect(function()
        range.Parent = workspace
         teleb.MouseButton1Click:connect(function()
  local Pos = script.Parent.Parent:findFirstChild(Teleport)
        hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end

end)
0
what's a range? did you mean a ranch? GamingOverlord756 48 — 5y
0
Oh you mean, slots? like other games! cherrythetree 130 — 5y

Answer this question