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? [UNANSWERED]

Asked by 5 years ago
Edited 5 years ago

I'm making a farm game, and I'd like to make it so that when a player joins, their "range", which is their plot of land, 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
Whats a range? you need to explain your script and problem better. GGButNO_RE 61 — 5y
0
How about just having ranges already set, and then when a player presses the button, teleport them to a range instead of creating a new one? Pojoto 329 — 5y

Answer this question