Hat references in scripts no longer viable - backwards compatibility

So according to the ROBLOX wiki, hats have been updated to have new characteristics that are suppose to make it easier to work with R15.

However; this has created a series of issues for myself, presumably because of a classname change (but i don’t know.)

The floor of my base is now littered with hats, and neither the admin cleaning command or autocleaner works; presumably because it’s trying to delete something that no longer exists.

Our hat-giver system also has a feature that removes hats, however this no longer works because it doesn’t think there are any hats.

These changes could cause issues for older games or older systems; however obviously these changes were necessary, it would be best if it was backwards-compatible to allow older scripts to give the same desired effect on new content.

1 Like

You need to change scripts that check obj.ClassName == “Hat” or obj:IsA(“Hat”) to use obj:IsA(“Accoutrement”) instead.
See this post for more information:


This is an easy fix, however for scripts and other things that are used by other players who don’t script or have no knowledge how to do this, it’s essentially breaking some content out there.

Would it not be simple to make the term “hat” just be an alternative word for “accoutrement”? this would work well for backwards compatability, and prevent older scripts from needing to be fixed.

Most popular hat scripts have been around for a long time and distributed widely over the years, a lot of people may have a problem that so many places scripts don’t work appropriately simply because it isn’t backwards compatible.

Issue with that is that they’re two different classes, technically.

That being said, @TheGamer101, I agree with Xelia. That’s not something you should just do, because it’s been like that for so long with games that won’t ever be updated that it presents a problem.

We’re going to look into adding a default hat cleanup feature for all games that can be opted out of. It’s a problem that affects every game, so I think it makes sense for us to provide a solution.


This makes sense, as removing the ability to drop hats as well as auto-clearing hats is most definitely the norm.


@Lilly_S @TheGamer101

An even larger issue has emerged out of this, many gun scripts rely on removing hats or causing damage to players via hats to emit damage, however now that hats no longer have the same properties, they are making users bulletproof.

This is further reason to make it backwards compatible, because popular weapon scripts such as youtubes and turbofusions rely on these methods, and many developers who made these weapons no longer update them.

It’s not hat clean up that is the issue, it’s the effect it has on any script related to hats that currently exists.

This needs to be addressed.

Not every game, player, developer, or lazy person out there is going to update their tools.

I’ve just learned that my clans guns are all incapable of killing people with hats by shooting via the head, I can fix this; but I’m not going to wait a year for all the other warclans out there to fix this too.

I agree that we should have a hat cleanup feature. As for automagically fixing the issue by making ClassName == “Hat” return true for accessories, not so much. I don’t see what the issue is – if war clans have bad bases, don’t raid them. This doesn’t apply to just hats. So many people say war clans have unfair/bad/etc bases but still raid them anyway. If you don’t like the base, don’t raid it.

And the reason war clans would take a year to fix this is because hardly any of them have programmers in the group (or experienced ones at least). If you make a fix for the issue, release your fix as a free model and groups will gobble it up – I did this with the sword physics when it started freezing people midair and that’s what happened. If groups aren’t using your fix, let them know about it and why they should use your fix. If it’s not as simple as releasing a model (e.g. you need to modify a specific part of their guns), just tell them “Change ClassName == “Hat” to IsA(“Accessory”)”, or provide some code to run in the command line which iterates through all their scripts and replaces ClassName == “Hat” with IsA(“Accessory”).

Why is hat dropping still a thing anyway? Seems like a legacy feature to me.

Please, don’t lecture me about where to and where not to raid.

War clans are not the issue here, it’s the technology and scripting involved.

If “Hats” are being completely removed anyway; why bother even changing the classname? Why not just use the current one?

It’s causing issues because hats block weapons damage, because most weapons are scripted to do damage to hats; and this is going to cause problems all around with older content that references hats; effectively ruining a lot of content that’s currently out there. I personally don’t want to feed through my hundreds of models to hotfix them all myself, just so this AVOIDABLE problem could be avoided.

I have a lot of people complaining to me about this all across the board, so I’m not just spreading this issue alone.

This was no doubt discussed whenever they were designing the new accessory system, and seeing as we’re not using the Hat class, this was already ruled out as a solution. A staff member will need to comment on the specifics, but for whatever reason(s), using Hat is not a good fit for the new accessories.

You toss around that it’s “avoidable” like you work at ROBLOX and were part of the design process for the new accessory system. If it were easy to fix it would have already been fixed – the ROBLOX staff are clearly aware of the issue as they mentioned that IsA(“Hat”) needed to be changed to IsA(“Accoutrement”) in the update thread, but they instead asked users to fix it themselves.

The technology makes the bases a poor choice to raid, yes. It’s your group that’s intentionally deciding to raid bad places regardless. That sounds like a personal problem and not one with ROBLOX.

Echo, it’s getting really difficult to tolerate your responses; I can’t help but notice you reply to a lot of places and post your opinions about things that don’t effect you, and then take knowledge you know nothing about and apply it here.

“War clans” are not the issue, in fact this is an issue that will affect all games that are not updated accordingly; and it’s quite obvious that not all games, especially past games that are no longer updated, are going to be updated to void this exact issue; this has happened in the past with script deprecations and feature removal.

Unless I can be given a real reason (this thread was directed towards the developers) why this cannot be made backwards compatible, I’m not going to stop asking for it to become backwards compatible.

I have already updated my bases in accordance with this issue, but the problem is I can’t expect others to do the same; You do not solve my issues by telling me that I should not go somewhere just because “it’s bad”, I raid a different group or two every day, I’m not going to nitpick at every single thing they have at their base; I’m going to nitpick at legitimate problems that should be avoidable.

Please don’t respond to this thread if you’re going to continue to be disruptive; I don’t work at ROBLOX and you clearly don’t need to point that out.


What is ad hominem for 500 points.

The ROBLOX staff have already acknowledged that they know the issue exists, but decided to take this course of action anyway. You don’t need a reason, and you don’t need a response from a staff member, to know that what you’re suggesting is not feasible.

And I’m certainly not going to learn that it’s not feasible by having you point it out to me, these threads are read by staff members frequently, if you didn’t know. And I’m presenting an issue that will affect lots of places, which “in my opinion” is quite important and relevant.

Do you do this to all threads?

Why is gear dropping still a thing? Or Messages and Hints? :stuck_out_tongue:

1 Like

But for tools there’s API to prevent it from being dropped (Tool::CanBeDropped), and most games turn off catalog gears anyway. Dropping hats can also affect gameplay though and I just don’t know if it should be allowed by default.

Oh for sure, if you want to add an option to turn it off, that’d be great, but it’s a thing still because it’d be more work than not to remove it.

…since when has “the staff knows best in all situations ever” ever been a rallying cry to stand behind? If this were the case, the devforums wouldn’t exist because our input would be useless.
Yet here we are.

Please stop trying to discount the concerns of others in communities that they’re more familiar with.

EDIT: this isn’t meant to be a shot at the staff, you guys are great

1 Like

Thank you.

1 Like