Hi! So this is probably a dumb question, but for some reason this code is not detecting when an attribute is a certain thing. I have already checked while the game was running and Roblox studio said the attribute is “Knife” but it is not printing it or doing 10 damage. am I using GetAttribute wrong?
if script:GetAttribute("Weapon") == "Knife" then
damage = 10
print("KNIFE")
else
damage = 5
end
I will show more code if you want, but I am pretty sure this part of the code is the issue.
A script which sees what you are holding sends the weapon name to this and this script tells you how much damage it does. I have figured out a better method but I still can’t get it to get the attribute.
NEVERMIND I was replying to you guys and realized it was because I have a localscript trying to send an attribute to a server script. I am dumb sorry for wasting your time.