Instane.new Object Not Being Recognized?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Just wanting to fix this issue
  2. What is the issue? Include screenshots / videos if possible!
    A script is not recognizing a object that was created
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Tried stuff, didnt work
Furnace = script.Parent

Player = game:GetService("Players")

TycoonOwner = Furnace.Parent:WaitForChild("TyoonOwned").Value

Furnace.Touched:Connect(function(Drop)
	if Drop.Name == "Drop" then
		
		Player:FindFirstChild(TycoonOwner).leaderstats.Money.Value += 10
		Drop:Destroy()
	else
		
	end
end)
TycoonDoor = script.Parent 

local TycoonOwned = Instance.new("StringValue")

TycoonOwned.Name = "TycoonOwned"
TycoonOwned.Parent = TycoonDoor.Parent

TycoonDoor.Touched:Connect(function(TycoonOwner)
	TycoonOwned.Value = TycoonOwner.Parent.Name
	
	TycoonDoor.Parent.Dropper.DropScript.Enabled = true
	
	print(TycoonOwned.Value)
	
	TycoonDoor:Destroy()
end)

I also checked if it saw the other objects, it did, but it didnt show the stringvalue that was created, well nvm, oddly i just fixed it by adding as an object of the game and not an instance.new

3 Likes

Can you explain what the code does? and what are you trying to do? and how you do it?

1 Like

He solved the problem, read at the end of the post

2 Likes