Hi there. I am trying to create a plot system, and when the game starts it teleports the player to their plot. Here is my local script which i put in Starter PLayer Scripts:
local player = game.Players.LocalPlayer local function MoveChar(Char, X, Z) wait(0.1) Char:SetPrimaryPartCFrame(CFrame.new(X, 3, Z)) end player.CharacterAdded:Connect(function(char) for i, plt in pairs(workspace.Plots:GetChildren()) do if plt then if plt.Plot.Owner.Value == player.Name then MoveChar(char, plt.Plot.Spawn.CFrame.X, plt.Plot.Spawn.CFrame.Z) break end end end end)
The error i am getting is that spawn is not a valid member of Part. Generally, i think that would mean i placed the spawn block in the wrong space. But these are my placements. P.S: All blocks are anchored
In workspace: Folder Plots. Model: Plot1 Part: Plot Value: Owner Part: Spawn
Is that confusing?
Apreciate any help!!! Thanks.