#when i compare two strings it dont work

1 messages · Page 1 of 1 (latest)

hazy dagger
#
spawnpartPosition = script.Parent.spawnpart.Position
newposition = Vector3.new(spawnpartPosition.X, spawnpartPosition.Y - 1, spawnpartPosition.Z)

tycoonowner = script.Parent.Parent.Parent.Values:GetAttribute("TycoonOwner")

canActivate = true

function clicked(player)
    
    if tycoonowner == player and canActivate then
        
        canActivate = false
        
        local part = Instance.new("Part")
        part.Size = Vector3.new(0.75,0.75,0.75)
        part.Position = newposition
        part.BrickColor = BrickColor.new("Royal purple")
        part:SetAttribute("Value",1)
        part.Parent = workspace
        
        task.wait(0.25)
        canActivate = true
        
    end
    
end

script.Parent.button.ClickDetector.MouseClick:Connect(clicked)
tame flameBOT
#

studio** You are now Level 5! **studio

hazy dagger
#

when i compare player dans tycoonowner it doesnt work

#

when i compare two strings it dont work

junior oar
#

What exactly is the error?

#

and is TycoonOwner value set properly before comparison?

hot harness
#

you are comparing an attribute to an instance - this will never be true

#

maybe use an objectvalue instead of instance attributes