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 » Scripting Helpers
Home Search
 

Re: Help with making virtually weightless hats

Previous Thread :: Next Thread 
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
27 Jun 2013 11:26 AM
I have this script to make the Handle in the hat virtually weightless, but the hats then fall off my character. Any idea how to fix this?

wait()
player = script.Parent.Parent
for index,hats in pairs(player.Character:GetChildren()) do
if hats:IsA("Hat") and hats:findFirstChild("Handle") then
hats.Handle.FormFactor = "Custom"
hats.Handle.Size = Vector3.new(0.2, 0.2, 0.2)
hats.Handle:MakeJoints()
end
end
Report Abuse
Penjuin3 is not online. Penjuin3
Joined: 05 Sep 2009
Total Posts: 175
27 Jun 2013 11:32 AM
player = script.Parent.Parent

for index,hat in pairs(player.Character:GetChildren()) do
if hat:IsA("Hat") and hats:findFirstChild("Handle") then
Spawn(function()
hat.Handle.FormFactor = "Custom"
hat.Handle.Size = Vector3.new(0.2,0.2,0.2)
hat.Parent = nil
wait()
hat.Parent = player.Character
end)
end
end



Try this.
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
27 Jun 2013 11:37 AM
Forgive me if I'm wrong (I'm really tired right now), but wouldn't Vector3.new just change the size of the handle in relation to what the original size is?

It seems to me you'd want

hat.Handle.Size = CFrame.new(0.2,0.2,0.2)

Once again, if I'm wrong, I'm REALLY tired right now XD
Report Abuse
crazyblox is not online. crazyblox
Joined: 16 Mar 2008
Total Posts: 6139
27 Jun 2013 11:42 AM
This works well, thanks!
Report Abuse
Penjuin3 is not online. Penjuin3
Joined: 05 Sep 2009
Total Posts: 175
27 Jun 2013 11:44 AM
No problem. :)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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