ive been trying for a couple days to get this to work and just cant seem to figure it out. i have an obby that players have to go through and kill the boss at the end and then use a teleporter to go back to start im trying to make the boss only respawn after they teleport away so they cant stay and kill him over and over so i thought i would use a function.

i put this in the teleporter brick

local Part = script.Parent

Part.Touched:Connect(Touched)

And this in the boss

name="Humanoid"

robo=script.Parent:clone()

local function Touched()
	
	if script.Parent.Humanoid.Health<1 then
		robot=robo:clone()
		robot.Parent=script.Parent.Parent
		robot:makeJoints()
		script.Parent:remove()
	end
end

please help.

1 comment

1

You can use touched events for that i.e (touched/touchedended) or magnitude