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: How should I go about converting this script to a local one?

Previous Thread :: Next Thread 
EvolutionPower is not online. EvolutionPower
Joined: 16 Dec 2013
Total Posts: 873
20 Jul 2017 07:12 AM
game.Players.PlayerAdded:connect(function(plyr)
plyr.CharacterAdded:connect(function(char)
wait(1)
for i,v in pairs(char:GetChildren()) do
if v.Name == "HumanoidRootPart" then
v.Transparency = 0.99
elseif v.Name == "Head" then
v.Transparency = 0
v.face.Transparency = 0
elseif v.ClassName == "Accessory" then
v.Handle.Transparency = 0
elseif v.ClassName == "Part" then
v.Transparency = 0
end
end
end)
end)


#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel
Report Abuse
EvolutionPower is not online. EvolutionPower
Joined: 16 Dec 2013
Total Posts: 873
20 Jul 2017 07:26 AM
b1


#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel
Report Abuse
DevJoas is not online. DevJoas
Joined: 17 Dec 2014
Total Posts: 627
20 Jul 2017 07:29 AM
Use Players.LocalPlayer

wiki.roblox.com/index.php?title=API:Class/Players/LocalPlayer
Report Abuse
EvolutionPower is not online. EvolutionPower
Joined: 16 Dec 2013
Total Posts: 873
20 Jul 2017 07:30 AM
no but like, i want to use that same code in a local one but it doesn't work.


#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel
Report Abuse
DevJoas is not online. DevJoas
Joined: 17 Dec 2014
Total Posts: 627
20 Jul 2017 07:37 AM
Yeah, so like I said

Remove the PlayerAdded conenction and use Players.LocalPlayer


Then depending on where the localscript is located you have to edit the plyr.CharacterAdded event.
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
20 Jul 2017 07:55 AM
local sp=script.Parent
local char=sp.ClassName=="Model"and sp
sp=nil
local function a(char)
for i,v in pairs(char:GetChildren()) do
if v.Name == "HumanoidRootPart" then
v.Transparency = 0.99
elseif v.Name == "Head" then
v.Transparency = 0
v.face.Transparency = 0
elseif v.ClassName == "Accessory" then
v.Handle.Transparency = 0
elseif v.ClassName == "Part" then
v.Transparency = 0
end;end;end;wait()
if char then
a(char)else
local player=game:GetService"Players".LocalPlayer
local char=player.Character
if char then a(char)end
player.CharacterAdded:Connect(a)
end;char=nil
Report Abuse
EvolutionPower is not online. EvolutionPower
Joined: 16 Dec 2013
Total Posts: 873
20 Jul 2017 07:57 AM
where should i place that local script?


#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel
Report Abuse
MrFading is not online. MrFading
Joined: 22 Mar 2015
Total Posts: 233
20 Jul 2017 08:08 AM
Put it in the player's starterpack
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