I’m asking if anybody has the code for the old hat dropping where you were once able to drop hats by pressing the ‘=’ key. I want to know how the hats were positioned once they were dropped into workspace because hats used to drop somewhere in front of you. I want the exact cframe. I just can’t seem to find it. Does anybody have it or know where to get it?
I am well aware of that but I’m asking for the CoreScript code where the cframe is in it. Thanks anyway tho
What “cframe in it” are you talking about.
I want the CoreScript code which is code ran behind the scenes of every game and is usually inaccessible even if you own the game.
We can’t read from core scripts for security reasons. What is the issue with the code in the post I linked.
The code Shedletsky wrote positioned the hats about 5-7 studs out from the front of the torso.
There’s a github online where you can view the CoreScript but I couldn’t find the old hat dropping part which may have been gone now.
Okay, but what is wrong with what I linked? It gets the job done.
Could you quote it cause I don’t see it anywhere?
I mainly require the cframe where the hats actually position in front of you. If you were to drop a part into workspace, it just drops where it is- your head and not in front of you. Thats why I believe they have a CoreScript running behind the scenes to detect Accessories entering workspace
You can offset the handle about 5 studs from the character. for example
accessory.Handle.CFrame = CFrame.new(character.Head.Position - Vector3.new(0, 0, 5))
it’s not a fixed value or anything, it’s relative to the character’s position
I understand that completely and thats what I did but I want the exact cframe code. I did some tests and it seems that code is a lot different than just simply adding +5 studs in front of you
This request is very unreasonable. All that matters is that it gets the job done. I feel we are spamming this thread. So I will sign off here. You get what you get and you don’t throw a fit.
Its mainly because I’m working on a game for someone where they want this kind of stuff to be OG so it has to be exactly. Especially if you were going to do things like jumping on your own hats
I also don’t want the hats to be picked up and there’s an issue where hats can drop ontop of transparent parts so I can’t use the actual accessory but rather position it myself using the handle inside
The script in the link provided by @incapaxx is already “OG”. TheGamer101 mentioned in the original post that the reason hats fall about 5 studs away from the torso is because the Roblox engine itself automatically does this when hats/accessories are parented to the workspace from the player. This means, AFAIK, that as long as you use the code provided, there’s no difference compared to the real thing.
This is incorrect. Roblox corescripts are publicly available. I’m fairly sure that there is no CFrame involved. I think this behaviour relied on the Hat instance, similar to how Tools work. We now have Accessories. You could try parenting a Hat instance and measuring the offset.
I understand but read what I said above. I can’t use the real thing because of those reasons. The game is an obby type and all they require is being able to jump on their hats
I tried measuring it but it doesn’t seem accurate. It really seems like some weird cframe code is doing that to the accessories so I can’t figure it out