This wont work. Please help

This wont work, I have the attribute as a boolean

player.Character:FindFirstChildOfClass(“Tool”):GetAttribute(“Owned”) = true

Take a look at the attribute documentation and scroll down to where it shows how to use attributes in scripts. Instance Attributes | Roblox Creator Documentation

Are you trying to check if it is true or not?
Well, you can use either of these.
if player.Character:FindFirstChildOfClass(“Tool”):GetAttribute(“Owned”) == true then
player.Character:FindFirstChildOfClass(“Tool”):SetAttribute(“Owned”, true)

It isn’t working because you need 2 =, try:

player.Character:FindFirstChildOfClass(“Tool”):GetAttribute(“Owned”) == true

Thank you! Just to clarify, I needed to change the attribute to true. I totally forgot about SetAttribute

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.