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 » Club Houses » Let's Make a Deal
Home Search
 

Re: How efficient is dis script

Previous Thread :: Next Thread 
SquidIy is not online. SquidIy
Joined: 12 Jul 2014
Total Posts: 27509
22 Jul 2015 04:40 PM
script.Parent.MouseButton1Down:connect(function()
player = script.Parent.Parent.Parent.Parent.Parent
if player then
if player.Character:findFirstChild("Torso") then
if player.Character.Torso:findFirstChild("Sparkles") then
player.Character.Torso.Sparkles:Remove()
script.Parent.Text = "OFF"
else
f = Instance.new("Sparkles")
f.Parent = player.Character.Torso
script.Parent.Text = "ON"
end
end
end
end)

( ͡° ͜ʖ ͡°) Siggys are too much work, like your mom | 171,063: RAP | ~SquidIy |
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
22 Jul 2015 04:44 PM
use :Destroy() instead of :Remove(), only problem i see

i'd do this tho (LocalScript)

local Plr = game.Players.LocalPlayer
local Char = Plr.Character or Plr.CharacterAdded:wait()


local function Clicked()
local Sparkles = Char['Torso']:findFirstChild('Sparkles')
if Sparkles then
Sparkles:Destroy()
script.Parent.Text = 'OFF'
else
Instance.new('Sparkles',Char['Torso'])
script.Parent.Text = 'ON'
end
end

script.Parent.MouseButton1Click:connect(Clicked)


Report Abuse
SquidIy is not online. SquidIy
Joined: 12 Jul 2014
Total Posts: 27509
22 Jul 2015 04:48 PM
o ty verbal

( ͡° ͜ʖ ͡°) Siggys are too much work, like your mom | 171,063: RAP | ~SquidIy |
Report Abuse
Ioudpack is not online. Ioudpack
Joined: 27 Oct 2014
Total Posts: 6200
22 Jul 2015 04:49 PM
hi squid


+12,122 posts -9Millionaire, Terintino, 9MiIIi, mxgos, ColourfulMula
Report Abuse
SquidIy is not online. SquidIy
Joined: 12 Jul 2014
Total Posts: 27509
22 Jul 2015 04:50 PM
hi

( ͡° ͜ʖ ͡°) Siggys are too much work, like your mom | 171,063: RAP | ~SquidIy |
Report Abuse
Sasayaki is not online. Sasayaki
Joined: 29 Jun 2007
Total Posts: 33868
22 Jul 2015 04:50 PM
To make verbal's more efficient turn all script.Parent into a new variable
Report Abuse
SquidIy is not online. SquidIy
Joined: 12 Jul 2014
Total Posts: 27509
22 Jul 2015 04:51 PM
@Sas
I'm good

( ͡° ͜ʖ ͡°) Siggys are too much work, like your mom | 171,063: RAP | ~SquidIy |
Report Abuse
SquidIy is not online. SquidIy
Joined: 12 Jul 2014
Total Posts: 27509
22 Jul 2015 04:52 PM
meh
why the hell not

local Plr = game.Players.LocalPlayer
local Char = Plr.Character or Plr.CharacterAdded:wait()
local Parent = script.parent

local function Clicked()
local Sparkles = Char['Torso']:findFirstChild('Sparkles')
if Sparkles then
Sparkles:Destroy()
Parent.Text = 'OFF'
else
Instance.new('Sparkles',Char['Torso'])
Parent.Text = 'ON'
end
end

Parent.MouseButton1Click:connect(Clicked)


( ͡° ͜ʖ ͡°) Siggys are too much work, like your mom | 171,063: RAP | ~SquidIy |
Report Abuse
WebGL3D is online. WebGL3D
Joined: 04 Sep 2013
Total Posts: 28311
22 Jul 2015 05:18 PM
wait()
local button = script.Parent
local sparkles = Instance.new("Sparkles",(game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait())['Torso'])

button.MouseButton1Click:connect(function()
sparkles.Enabled = not sparkles.Enabled
button.Text = sparkles.Enabled and "ON" or "OFF"
end)


~ 1Topcop ~ WebGL3D ~ Java3D ~ Data3D ~ Purple Squid >
Report Abuse
EpikSorrowV2 is not online. EpikSorrowV2
Joined: 23 May 2015
Total Posts: 13546
22 Jul 2015 05:19 PM
print("hello world")
Report Abuse
SquidIy is not online. SquidIy
Joined: 12 Jul 2014
Total Posts: 27509
22 Jul 2015 05:21 PM
@Web
I'm amazed

( ͡° ͜ʖ ͡°) Siggys are too much work, like your mom | 171,063: RAP | ~SquidIy |
Report Abuse
WebGL3D is online. WebGL3D
Joined: 04 Sep 2013
Total Posts: 28311
22 Jul 2015 05:23 PM
I recommend waiting at the start of a LocalScript, rarely but sometimes if you don't wait the script won't load at all. I forget what causes it though, crazyman32 made a post about it at one point. :P


~ 1Topcop ~ WebGL3D ~ Java3D ~ Data3D ~ Purple Squid >
Report Abuse
bluefredy is not online. bluefredy
Joined: 23 Oct 2010
Total Posts: 59243
22 Jul 2015 05:25 PM
add

repeat wait() until Player.Character

and make sure to make the torso a variable

local Torso = Player.Character:FindFirstChild("Sparkles")

it's not too bad tho
Report Abuse
bluefredy is not online. bluefredy
Joined: 23 Oct 2010
Total Posts: 59243
22 Jul 2015 05:26 PM
nvm webs is beautiful
Report Abuse
SquidIy is not online. SquidIy
Joined: 12 Jul 2014
Total Posts: 27509
22 Jul 2015 05:26 PM
@Web
mk

( ͡° ͜ʖ ͡°) Siggys are too much work, like your mom | 171,063: RAP | ~SquidIy |
Report Abuse
HoodedTurtlelord is not online. HoodedTurtlelord
Joined: 07 Jul 2010
Total Posts: 12440
22 Jul 2015 05:34 PM
lol'd


Socom+Rex+WCS+TGC>All | Add 6k posts to my count
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
22 Jul 2015 05:36 PM
i was about 2 post something similar 2 web's but i checked if some1 posted it already. );


Goal for the month: idk
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Let's Make a Deal
   
 
   
  • 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