local player = game.Players.LocalPlayer local plot local function MoveChar(char) wait(0.1) char:SetPrimaryPartCFrame(CFrame.new(plot.Plot.Spawn.CFrame.X,plot.Plot.Spawn.CFrame.Y + 5, plot.Plot.Spawn.CFrame.Z)) end player.CharacterAdded:Connect(function(char) for i,v in pairs(workspace.Plots:GetChildren()) do if v then if v.Plot.Owner.Value == player then plot = v MoveChar() break end end end end)
The reason your code is not working as you are not sending over the "Char" as an argument when running your custom funtion. Thats an easy fix. Use this:
local player = game.Players.LocalPlayer local plot local function MoveChar(char) wait(0.1) char:SetPrimaryPartCFrame(CFrame.new(plot.Plot.Spawn.CFrame.X,plot.Plot.Spawn.CFrame.Y + 5, plot.Plot.Spawn.CFrame.Z)) end player.CharacterAdded:Connect(function(char) for i,v in pairs(workspace.Plots:GetChildren()) do if v then if v.Plot.Owner.Value == player then plot = v MoveChar(char) break end end end end)
dosent player.CharacterAdded only fire on the server? if not my bad