local owner = script.Parent.Parent.Parent.Owner
print(player.Name.. " THIS IS NAME OF PLAYER")
print(tostring(owner.Value).. " THIS IS VALUE OF OWNER")
if player.Name == owner.Value then
print("is owner")
else
print("is not owner")
end
My code right here is printing out my full username and the owner value. They are identical.
Though… It still goes with is not the owner… I’m generally so confused with this little tiny thing?
local owner = script.Parent.Parent.Parent.Owner
print(player.Name.. " THIS IS NAME OF PLAYER")
print(tostring(owner.Value).. " THIS IS VALUE OF OWNER")
if string.lower(player.Name) == string.lower(owner.Value) then
print("is owner")
else
print("is not owner")
end
I’d suggest using an int value as the value and set it to the Owners UserId and then check if it matches the players userid
Player names can change, player ids NEVER change
Here is an example
SET INT VALUE TO PLAYER ID
local Owner = script.Parent.Parent.Parent.Owner
print(Owner.Value .. ", is the game creators UserId")
if Owner.Value == Player.UserId then
print("Player is Owner")
else
print("Player is a Guest")
end
Could we see :
What type of value is ‘Owner’?
Here I assume it is either a NumberValue or an IntValue.
Also try this:
local owner = script.Parent.Parent.Parent.Owner
print(player.Name.. " THIS IS NAME OF PLAYER")
print(owner.Value).. " THIS IS VALUE OF OWNER")
print(owner.Value) -- does it print?
if owner.Value == player.UserId then --alternatively, you could compare with their name.
print(player.Name.."is owner")
else
print(player.Name.."is not owner")
end
I am pretty sure the owner value is probably for the owner of the vehicle or something like a tycoon owner. Not the owner of the game. Which is why he cannot set a string like that.