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

I got a virus and the main one script that got messed up is this one. Any errors?

function onTouch(part)
if part.Parent.Humanoid ~=nil then
part.Parent:MoveTo(script.Parent.Parent.Tele1.Position)
script.Parent.Parent.Tele1.Script.Disabled = true 
wait(2)
script.Parent.Parent.Tele1.Script.Disabled = false
end
end
script.Parent.Touched:connect(onTouch)

it does not work and I cant see what is wrong.

1 comment

0

This is Tele2 by the way. And Tele1 has the same thing. But each time it says Tele1 it is changed to Tele2 inside of Tele1. If that makes sense.

1 answer

	function onTouch(part)
	if part.Parent:FindFirstChild("Humanoid") ~=nil then
	part.Parent:MoveTo(script.Parent.Parent.Tele1.Position)
	script.Parent.Parent.Tele1.Script.Disabled = true
	wait(2)
	script.Parent.Parent.Tele1.Script.Disabled = false
	end
	end
	script.Parent.Touched:connect(onTouch)

This should fix your problem

1 comment

0

Do not answer without explaining your code

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