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

This script still makes you sit?

I even have it set to false but it still makes you sit, how do you fix this?

function onDamage(Part)
	if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then
		script.Disabled = true
		f = Instance.new("Fire", Part)
		for i = 1,25 do
			f.Size = f.Size +0.25
			Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health -1
			wait(0.05)
		end
		Part.Parent.Humanoid.Sit = false
		f:remove()
		script.Parent:remove()
	end
	wait(0.025)
end

script.Parent.Touched:connect(onDamage)

5 comments

0

It seems like "script.Parent.Name" isn't supposed to be a string literal and is supposed to be referring to script.Parent.Name itself.

0

What should It look like then?

0

script.Parent.Name instead of "script.Parent.Name"

0

What line?

0

The only line with "script.Parent.Name" on it (2)

1 answer

✓ Accepted answer
   if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.Name" then

This line is the problem. It should say

   if Part.Parent:FindFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= script.Parent.Name then

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