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

What did I do wrong?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Basically, I searched for a map script. It's in a folder in workspace, and the "map" is in lighting, it is basically clones. In the "map" I have a script like situations, if I say run/s1 the clones go to an invisible brick. But I've tested it and when the map is already in workspace, it works. When it is in lighting, it doesn't can anyone help? Here's the code if needed

smar = script.Parent.smurf1
a1 =script.Parent.sit1
a2 = script.Parent.sit2
a3 = script.Parent.sit3
a4 = script.Parent.sit4
a5= script.Parent.sit5
pg = script.Parent.pg
smar2 = script.Parent.smurf2






names = {"iDefrostation","TheInfinityCode","Rose2Raw","XxKaratinzxX","Player1"} 




game.Players.PlayerAdded:connect(function(player)
    for i, v in pairs(names) do
        if v == player.Name then 
            player.Chatted:connect(function(chatmsg)
                if chatmsg:sub(1,7) == "run/mid" then 
                        smar2.Humanoid:MoveTo(a3.Position)
                        smar.Humanoid:MoveTo(a5.Position)
                        pg.Humanoid:MoveTo(a2.Position)
                                pg.Humanoid:MoveTo(a1.Position)
                end
            end)
        end
    end
end)

0
And this is why you don't use free models. They suck. Please learn to script yourself. Perci1 4988 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

It checks to see if you are a selected player who can use it. Since your username isn't in there, it won't work.

names = {"iDefrostation","TheInfinityCode","Rose2Raw","XxKaratinzxX","Player1"}

So you need to replace the "Player1" with your name, like so.

names = {"iDefrostation","TheInfinityCode","Rose2Raw","XxKaratinzxX","tyler46783"}
Ad

Answer this question