At line 6 the script stops. What should be happening is when a player takes a tycoon, it defines the tycoon within Workspace.
The script works fine but it just ends at line 6. Maybe I did it wrong? This is a normal script within a GUI. Just want to know if I set the WaitForChild wrongly.
It does define owner as the player and the tycoon when it gets claimed is exactly the same as what line 6 is looking for.
wait(2)
Name = script.Parent.Parent.Subject
owner = script.Parent.Parent.Parent.Parent.Parent.Parent
print("Found Owner!")
print(owner)
t = game.Workspace:WaitForChild(owner.Name.."'s Tycoon!") -- doesn't go past this.
-- repeat wait() until t (This was a test, didn't really fix it)
print("Found the tycoon!")
Grading = t.p:FindFirstChild(Name.Value.."drop")
improve = Grading.Drops.Need
using = false
script.Parent.MouseButton1Click:connect(function()
if using == false then
using = true
if improve.Value == script.Parent.Limit.Value then
script.Parent.BackgroundColor3 = BrickColor.Red()
else
improve.Value = improve.Value - 1
end
using = false
end
end)

1 comment
Okay, they should change it so it also detects other things besides things getting created :/