So I have a house system that when you click a door you purchase a house(you pay some money, the owner stringvalue's value gets changed to your name) and when you touch the door, it opens it up. Everything worked fine until the last update I made where I added some furniture to the house. Nothing else. No script changes. Any idea why? Here's the code:

owner = script.Parent.Parent:WaitForChild("Owner")

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		print("There's a Humanoid")
		if hit.Parent.Name == owner.Value then
			print("It's the owner")
			script.Parent.Transparency = 0.5
			script.Parent.CanCollide = false
			print("Door open")
			wait(5)
			script.Parent.Transparency = 0
			script.Parent.CanCollide = true
			print("Door close")
		end
	end
end)

It doesn't even print "There's a Humanoid".

9 comments

0

Maybe there are multiple stuff called "Owner"?

0

What is the parent of your door?

0

A model called House

0

And there is only one string value named Owner

0

check your model

0

I did...

0

And there is a value in the house?

0

Check if there are multiple values like "Owner" in the house

0

Everything is fine. Just the script doesn't work.