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's wrong with this FE compatible script

Previous Thread :: Next Thread 
VRYLLION is online. VRYLLION
Joined: 22 Dec 2014
Total Posts: 191
28 Mar 2017 12:06 AM
This is a localscript with filtering enabled true. The following does "work", meaning the hat is put inside of the player's character. But the character doesn't wear it. Assume the locations I reference in the code exist and that the hat does weld properly.

repeat wait() until game.Players.LocalPlayer

you = game.Players.LocalPlayer.Character
script.Parent.MouseButton1Down:connect(function()
if you ~= nil then
local char = you:GetChildren()
for i =1, #char do
if char[i].Name == "Helmet" then
char[i]:remove()
end
end
local tot = game.Lighting.Helmets.Bolts:GetChildren()
for i =1, #tot do
if tot[i].Name == script.Parent.Name then
local get = tot[i]:clone()
get.Parent = you
get.Name = "Helmet"
end
end
end
end)
Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
28 Mar 2017 12:07 AM
wiki.roblox.com/index.php?title=API:Class/Humanoid/AddAccessory


Report Abuse
VRYLLION is online. VRYLLION
Joined: 22 Dec 2014
Total Posts: 191
28 Mar 2017 12:10 AM
That shouldn't really make a difference. I still have old hat objects that can be worn just fine. Although I already tried it as an accessory, same result.
Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
28 Mar 2017 12:11 AM
Does it work with FE off?


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
28 Mar 2017 01:08 AM
Use remote events and store the hat in server storage. Don't store anything in lighting.


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