generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: What was the script for hat dropping?

Previous Thread :: Next Thread 
REALkittyAndCats is not online. REALkittyAndCats
Joined: 16 Feb 2015
Total Posts: 1896
22 Jan 2017 04:30 PM
I forgot it, I need it for a game. They gave a script to use after hat dropping removal, post it here please.
Report Abuse
TheXxxGamersxxX is not online. TheXxxGamersxxX
Joined: 16 May 2016
Total Posts: 38
22 Jan 2017 04:51 PM
local function dropHats()
local localPlayer = game:GetService("Players").LocalPlayer
if localPlayer and localPlayer.Character then
for _, obj in pairs(localPlayer.Character:GetChildren()) do
if obj:IsA("Accoutrement") then
obj.Parent = game.Workspace
end
end
end
end

game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
if not gameProcessedEvent then
if inputObject.KeyCode == Enum.KeyCode.Equals then
dropHats()
end
end

end)

--Made by TheXxxGamersxxX
--- PUT IT STARTER PLAYER SCRIPTS!!!
Report Abuse
alphawolvess is not online. alphawolvess
Joined: 04 Jul 2012
Total Posts: 354
22 Jan 2017 05:08 PM
You can disable the hat drop button now


Tix Are Gone, Get Over It
Report Abuse
TheXxxGamersxxX is not online. TheXxxGamersxxX
Joined: 16 May 2016
Total Posts: 38
22 Jan 2017 05:17 PM
When did i say i wanted tix back? In the old forum? I ALREADY KNOW ITS GONE BRUH, CHILLAX.
Report Abuse
TheXxxGamersxxX is not online. TheXxxGamersxxX
Joined: 16 May 2016
Total Posts: 38
22 Jan 2017 05:19 PM
I'm trying to help someone with a script, meanwhile a guy named alpha changes the whole subject (I bet he cant make that script i made LOL)
Report Abuse
vacua is online. vacua
Joined: 10 Sep 2013
Total Posts: 298
22 Jan 2017 05:23 PM
chillax dude /\


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
22 Jan 2017 05:26 PM
That's his signature, it wasn't intended for you to read
Unless you're being ironic.
Is that even irony?

Anyways, if I understand the title of your post, this will clean your game

workspace.ChildAdded:connect(function(child)
if child:IsA("Accessory") or child:IsA("Hat") then
child:Destroy()
end
end)

If you meant press backspack to drop, then

-- local script in the starterGui

local player = game.Players.LocalPlayer
local char = player.CharacterAdded:wait()
local uis = game:GetService("UserInputService")
local HatDropEvent = game.ReplicatedStorage:WaitForChild("HatDropEvent")

uis.InputBegan:connect(function(input,gp) -- the player presses a key
if input.KeyCode == Enum.KeyCode.Backspace and not gp then -- if the key is Backspace and they didn't press it while typing
HatDropEvent:FireServer() -- tell the server to drop the hats
end
end)


-- and put this half in a server script in the ServerScriptService
local HatDropEvent = Instance.new("RemoteEvent",game.ReplicatedStorage) -- make a new event that we can listen for when players drop their hats
HatDropEvent.Name == "HatDropEvent"
HatDropEvent.OnServerEvent:connect(function(player)
for _,v in next,player.Character:GetChildren() do -- iterate through the char's children to find the hats
if v:IsA("Hat") or v:IsA("Accessory") then
v.Position = player.Character.Head.Position+Vector3.new(0,4,0) -- drop it 4 studs above the head
v.Parent = workspace -- no longer parented to character
end
end
end)




Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
22 Jan 2017 05:27 PM
Also please learn the concept of what a "signature" is on forums, or you will get offended really quickly, lol


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
22 Jan 2017 05:28 PM
I don't think your code will work in FE. It's best not to affect the world (even your character) from a local script. Let the server do that.


Report Abuse
REALkittyAndCats is not online. REALkittyAndCats
Joined: 16 Feb 2015
Total Posts: 1896
22 Jan 2017 06:35 PM
Thanks!
Report Abuse
TheXxxGamersxxX is not online. TheXxxGamersxxX
Joined: 16 May 2016
Total Posts: 38
23 Jan 2017 10:42 AM
Hmm... Who doesn't know what "signature" means... IDK bruh.

Shutup, and get over it.
(SIGNATURE)
Report Abuse
Rocketerkid is not online. Rocketerkid
Joined: 10 Oct 2011
Total Posts: 1237
23 Jan 2017 10:46 AM
Tix are gone, get over it. >:(
Report Abuse
RogueMage is not online. RogueMage
Joined: 28 Jan 2012
Total Posts: 1235
23 Jan 2017 10:54 AM
Gamer is so triggered


Report Abuse
Real_Spooky is not online. Real_Spooky
Joined: 23 Oct 2013
Total Posts: 3149
23 Jan 2017 10:56 AM
@Gamers

You're one of the people, that I can say with 100% confidence, is a complete and total moron.
Report Abuse
QuadAlpha is not online. QuadAlpha
Joined: 27 Jan 2014
Total Posts: 150
23 Jan 2017 11:17 AM
Okay so, gonna point this out now.


@xXGamers w/e your name is
nice copy/paste directly from

http://devforum.roblox.com/t/removing-accessory-dropping-key-shortcut/31214
"--Made by TheXxxGamersxxX
--- PUT IT STARTER PLAYER SCRIPTS!!!"
You didn't make that


@Soybeen

"His/her" method will work and replicate properly, also parenting Accoutrement to workspace will automatically move the hats in front of the player like they used to. That's done in the engine and you don't have to do that, it's the same with the replication.

source(s) - http://devforum.roblox.com/t/removing-accessory-dropping-key-shortcut/31214
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
23 Jan 2017 12:50 PM
When it comes to ANY affection of the workspace, I request it from a local script, and enact it from the server.
Saves researching the character's grey area.

If my script suffers from being unable to detect Accoutrements, it's literally just as simple as adding an or v:IsA("Accoutrement") to my code.


Report Abuse
TheXxxGamersxxX is not online. TheXxxGamersxxX
Joined: 16 May 2016
Total Posts: 38
23 Jan 2017 04:31 PM
@QuadAlpha

I did make it, never seen that article bruh.
Maybe i just had the same thinking BUT, i made that after that article came out ;-;

"Gamer is so triggered."
I clearly am.

Shutup, and get over it. <3
Peace out
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
23 Jan 2017 05:28 PM
Gamer do you still not understand?
That's a signature.
Please google what a signature is right now.
He wasn't saying anything to you when he mentioned something about Tix in his signature.
He wasn't even talking to you, lol.

This misunderstanding is hilarious.


Report Abuse
RobuxLife is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
23 Jan 2017 05:32 PM
>bruh

lol, he's 12

besides you didnt make it


Report Abuse
TheXxxGamersxxX is not online. TheXxxGamersxxX
Joined: 16 May 2016
Total Posts: 38
23 Jan 2017 08:44 PM
"This misunderstanding is hilarious."

It clearly is.

Shutup, and get over it.
Peace out.
Report Abuse
Rocketerkid is not online. Rocketerkid
Joined: 10 Oct 2011
Total Posts: 1237
23 Jan 2017 08:45 PM
I know I'm not helping by posting, but this thread has been alive far too long.
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
23 Jan 2017 08:48 PM
he made it with the EXACT same variable names? HAHAHAHHHAHAHAAH GREAT JOKE


Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
23 Jan 2017 08:49 PM
wtf gamer why are you trying to say you made it
the scripts are literally identical

not even that you go on to ridicule people about how they "cant make that script"
Report Abuse
REALkittyAndCats is not online. REALkittyAndCats
Joined: 16 Feb 2015
Total Posts: 1896
23 Jan 2017 10:08 PM
Lol yeah.
Report Abuse
TheXxxGamersxxX is not online. TheXxxGamersxxX
Joined: 16 May 2016
Total Posts: 38
24 Jan 2017 10:24 AM
"wtf gamer why are you trying to say you made it"
I clearly am.

Shutup, and get over it <3.
Peace out.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image