function oc(pl, dc)
if (dc.Name == "Yes") then
print("You own this tycoon!")
workspace.Tycoon.DoorHeader.UnownedPharmacy.Name =pl.Name.."'s Tycoon"
if not pl.Name.hastycoon.Value then
pl.Name.hastycoon.Value=true
script.Parent.Parent.Parent.Parent.Parent.OwnerName.Value=pl.Name
end
end
if (dc.Name =="No") then
print("You do not own this tycoon!")
end
end
script.Parent.DialogChoiceSelected:connect(oc)
The function of this script is to allow a player to initiate dialog, and claim a tycoon, without being able to claim another. When I start the game and go through the dialog, the hastycoon value is not changed to true and I'm a little stuck as to why.
Thanks!

2 comments
Is their any error in the output?
I tried your solution and it didn't work, but there was an error in the output this time. "Workspace.Tycoon.Model.Manager.Head.Dialog.Dialog Claim:9: attempt to index field 'hastycoon' (a nil value)" I have properly identified "hastycoon" , set it to false, and set its parent as the player with hastycoon.Parent=plr