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

Setting values to a findfirstchild not working?

Asked by 8 years ago
text=script.Parent.ChatInput.Text
playername=script.Parent.Parent.Parent.Parent.Name





while true do
workchildren=workspace:GetChildren()
for i=1, #workchildren do

    local cycleChild=workchildren[i]
    print(cycleChild.Name)

    if cycleChild.Name==playername then
        print("WOOHOO IT'S", playername)

        cycleChild.Name="HelloSir"



    end


end

wait(3)
end

Gives a stack error:

13:58:32.648 - An error occurred
13:58:32.650 - Stack Begin
13:58:32.650 - Script 'Players.Player1.PlayerGui.noa.ChatFrame.Script', Line 18
13:58:32.651 - Stack End
0
You aren't allowed to change the name of some objects, e.g., player's Character models. BlueTaslem 18071 — 8y

Answer this question