Hi there! Very new to scripting. What am I doing wrong here? My output has not been "Owns the tycoon" and only returns multiples of "False." I've replaced "if player.OwnershipStatus.Owner.Value == false" with other qualifiers and those have all worked, but not this. Any help would be appreciated!
local Players = game:GetService("Players")
local part = script.Parent
local function onTouched(part)
local player = Players:GetPlayerFromCharacter(part.Parent)
if not player then return end
if player.OwnershipStatus.Owner.Value == false then
script.Parent.Parent.Name = player.Name.."'s Tycoon"
script.Parent.Parent.Parent.Owner.Value = player.Name
script.Parent.CanCollide = false
player.OwnershipStatus.Owner.Value = true
print(player.Name.." Owns the Tycoon!")
else
print(player.OwnershipStatus.Owner.Value)
end
end
part.Touched:Connect(onTouched)

2 comments
you use local part = script.Parent and part = Part Touched its the same name. change the variable name that not the same name.
Thank you! I did that as well as add "" around false and that fixed it!