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

Teleport script doesnt work for noobs("zombies"), why?

Here is the script inside the part

noob = workspace.Noob
noob2 = workspace.Noob2
stept = script.Parent
noobspawn = workspace.noobback.Position

function onTouched()
	if stept ~= nil then
		local h = stept:FindFirstChild("Noob")
		if h~= nil then
        h.Humanoid:MoveTo(noobspawn)
		end
	end
end

function onTouched()
	if stept ~= nil then
		local h = stept:FindFirstChild("Noob2")
		if h~= nil then
        h.Humanoid:MoveTo(noobspawn)
		end
	end
end

script.Parent.Touched:connect(onTouched)

Thank you :)

1 answer

You are not suppose to use numbers in the name when adding in a variable.

In this case, you added the variable "noob2", maybe change the name?

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