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

My "Postion Updater" doesn't work?

Asked by
lucas4114 607 Moderation Voter
8 years ago

So, I made this and.... I tryed looking on the wiki about this stuff and still couldn't fix this please help me?

wait(0.1)

function Update()
    local children = game.Players:GetChildren()
    local PlayerName = script.Parent.Parent.Name
    for i = 1, #children do
        local plr = (i, children[i].PlayerGui.Players:WaitForChild(PlayerName))
        plr.Position = script.Parent.Position
    end
end

script.Parent.Changed:connect(Update)

The output also said: 20:49:40.351 - Workspace.Players.Player.PlayerPosition.PositionUpdater:9: attempt to index local 'plr' (a number value)

0
Take "i, " out and try again Validark 1580 — 8y
0
Make the "wait(0.1)" a "wait(1)"; sometimes 0.1 doesn't give the game enough time. SchonATL 15 — 8y
0
taking "i," out works but I still am not sure if that will work for more then 1 person in game. lucas4114 607 — 8y
0
lucas, what is the script's parent? xAtom_ik 574 — 8y

Answer this question