Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What did I do wrong?

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)

1 comment

0

And this is why you don't use free models. They suck. Please learn to script yourself.

1 answer

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"}

This discussion is preserved as it was. New answers, comments, and votes are closed.