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: Transparency issue

Previous Thread :: Next Thread 
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 02:39 PM
If I do this:

if Beam.Transparency > 1 then
Beam:Destroy()
end;




It doesn't destroy it until Transparency = 2. Can someone explain the reason or is it a glitch?


print(#noobs)
Report Abuse
Pxkez is not online. Pxkez
Joined: 24 Sep 2015
Total Posts: 1066
11 Jun 2016 02:40 PM
if Beam.Transparency > 0.9 then
Beam:Destroy()
end;
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jun 2016 02:41 PM
if Beam.Transparency => 1 then
Beam:destroy()
end;

Transparency is obviously a scale from 0 to 1, so I don't know hwy it would ever be >1. I'd consider it a glitch if it wasn't an obvious constraint you were breaking :P

Also, what is the purpose of your semicolons everywhere?


Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 02:42 PM
Thanks. Im feel stupid now :/


print(#noobs)
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 02:46 PM
Neither of them worked. Is this a roblox issue?


print(#noobs)
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 02:50 PM
I tried this but it didn't work either:



spawn(function()
if Beam.Transparency >= 0.9 then
Beam:Destroy()
end;
end);


print(#noobs)
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jun 2016 02:53 PM
What is the context of this code?
There's no reason that it shouldn't destroy the part if the transparency is 1. I notice you are doing a lot of spawns() and delays() and that sort of thing. Try not to make it unnecessarily convoluted :)

Also that code he gave you is silly because you're literally missing out on every transparency between 0.9 and 1.
ex: 0.95 ? :)




Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 02:54 PM
ik that, In this part of the code, the statement is clean, its not in anything besides the keydown function.


print(#noobs)
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 02:58 PM
I can honestly post the entire script but it may hurt your eyes lol.


print(#noobs)
Report Abuse
Pxkez is not online. Pxkez
Joined: 24 Sep 2015
Total Posts: 1066
11 Jun 2016 02:59 PM
Post it
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 02:59 PM
--[[ Variables ]]--
local Player = game.Players.LocalPlayer
local Character = game.Workspace:WaitForChild(Player.Name)
local Hold = false
local AttackMode = false
local Waves = true
local AirWaves = true
local CircleSizeSpeed = 1000
local Mouse = Player:GetMouse()
local MagicParts = {
script.MagicCircle1,
script.MagicCircle2,
script.MagicCircle3,
script.MagicCircle4,
script.MagicCircle5,
script.MagicCircle6,
script.MagicCircle7,
script.MagicCircle8,
script.MagicCircle9,
script.MagicCircle10,
script.MagicCircle11,
script.Beam,
script.BeamBall,
script.Wave,
script.BlastTip,
script.AirWave;

}
--[[ Functions ]]--
Mouse.KeyDown:connect(function(Key)
if Key:lower() == "x" then
Hold = true
AttackMode = true
Character.Torso.Anchored = true
Character.Head.Anchored = true
Character["Right Arm"].Anchored = true
Character["Left Arm"].Anchored = true
Character["Right Leg"].Anchored = true
Character["Left Leg"].Anchored = true
game.Workspace["Lunar Beam Music"]:Play()
local MagicCircle1 = MagicParts[1]:Clone()
MagicCircle1.Parent = Character
MagicCircle1.CFrame = Character.Torso.CFrame * CFrame.new(0,30,0)
MagicCircle1.Rotation = Vector3.new(180,0,90)
Character.MagicCircle1.CircleSet1:Play()
delay(0,function()
while Hold do
for i = 1,1 do
MagicCircle1.Size = MagicCircle1.Size + Vector3.new(0,2,2)
wait()
end;
if MagicCircle1.Size.magnitude > Vector3.new(0,100,100).magnitude then
Hold = false
end;
end;
if MagicCircle1.Size.magnitude > Vector3.new(0,100,100).magnitude or Hold == false then
wait(.1)
local MagicCircle2 = MagicParts[2]:Clone()
MagicCircle2.Parent = Character
MagicCircle2.CFrame = Character.Torso.CFrame * CFrame.new(0,40,27)
MagicCircle2.Rotation = Vector3.new(180,0,90)
Character.MagicCircle2.CircleSet2:Play()
wait(.1)
local MagicCircle3 = MagicParts[3]:Clone()
MagicCircle3.Parent = Character
MagicCircle3.CFrame = Character.Torso.CFrame * CFrame.new(0,40,-27)
MagicCircle3.Rotation = Vector3.new(180,0,90)
Character.MagicCircle3.CircleSet2:Play()
wait(.1)
local MagicCircle4 = MagicParts[4]:Clone()
MagicCircle4.Parent = Character
MagicCircle4.CFrame = Character.Torso.CFrame * CFrame.new(27,40,0)
MagicCircle4.Rotation = Vector3.new(180,0,90)
Character.MagicCircle4.CircleSet2:Play()
wait(.1)
local MagicCircle5 = MagicParts[5]:Clone()
MagicCircle5.Parent = Character
MagicCircle5.CFrame = Character.Torso.CFrame * CFrame.new(-27,40,0)
MagicCircle5.Rotation = Vector3.new(180,0,90)
Character.MagicCircle5.CircleSet2:Play()
for i = 1,40 do
MagicCircle2.Size = MagicCircle2.Size + Vector3.new(0,0.25,0.25)
MagicCircle3.Size = MagicCircle2.Size + Vector3.new(0,0.25,0.25)
MagicCircle4.Size = MagicCircle2.Size + Vector3.new(0,0.25,0.25)
MagicCircle5.Size = MagicCircle2.Size + Vector3.new(0,0.25,0.25)
wait()
end;
wait(.1)
Character.MagicCircle5.CircleSet2:Stop()
local MagicCircle6 = MagicParts[6]:Clone()
MagicCircle6.Parent = Character
MagicCircle6.CFrame = Character.Torso.CFrame * CFrame.new(0,50,0)
MagicCircle6.Rotation = Vector3.new(180,0,90)
Character.MagicCircle6.CircleSet1:Play()
for i = 1,25 do
wait(i/CircleSizeSpeed)
MagicCircle6.Size = MagicCircle6.Size + Vector3.new(0,3,3)
end;
wait(.1)
local MagicCircle7 = MagicParts[7]:Clone()
MagicCircle7.Parent = Character
MagicCircle7.CFrame = Character.Torso.CFrame * CFrame.new(-15,60,15)
MagicCircle7.Rotation = Vector3.new(180,0,90)
Character.MagicCircle7.CircleSet2:Play()
wait(.1)
local MagicCircle8 = MagicParts[8]:Clone()
MagicCircle8.Parent = Character
MagicCircle8.CFrame = Character.Torso.CFrame * CFrame.new(15,60,15)
MagicCircle8.Rotation = Vector3.new(180,0,90)
Character.MagicCircle8.CircleSet2:Play()
wait(.1)
local MagicCircle9 = MagicParts[9]:Clone()
MagicCircle9.Parent = Character
MagicCircle9.CFrame = Character.Torso.CFrame * CFrame.new(-15,60,-15)
MagicCircle9.Rotation = Vector3.new(180,0,90)
Character.MagicCircle9.CircleSet2:Play()
wait(.1)
local MagicCircle10 = MagicParts[10]:Clone()
MagicCircle10.Parent = Character
MagicCircle10.CFrame = Character.Torso.CFrame * CFrame.new(15,60,-15)
MagicCircle10.Rotation = Vector3.new(180,0,90)
Character.MagicCircle10.CircleSet2:Play()
for i = 1,40 do
MagicCircle7.Size = MagicCircle7.Size + Vector3.new(0,0.25,0.25)
MagicCircle8.Size = MagicCircle8.Size + Vector3.new(0,0.25,0.25)
MagicCircle9.Size = MagicCircle9.Size + Vector3.new(0,0.25,0.25)
MagicCircle10.Size = MagicCircle10.Size + Vector3.new(0,0.25,0.25)
wait()
end;
local MagicCircle11 = MagicParts[11]:Clone()
MagicCircle11.Parent = Character
MagicCircle11.CFrame = Character.Torso.CFrame * CFrame.new(0,70,0)
MagicCircle11.Rotation = Vector3.new(180,0,90)
Character.MagicCircle11.CircleSet1:Play()
for i = 1,25 do
wait(i/CircleSizeSpeed)
MagicCircle11.Size = MagicCircle11.Size + Vector3.new(0,1.5,1.5)
end;
delay(0,function()
delay(0,function()
while Waves do
local Wave = MagicParts[14]:Clone()
Wave.Parent = Character
Wave.CFrame = Character.Torso.CFrame * CFrame.new(0,-3,0) * CFrame.Angles(0,math.rad(math.random(-360,360)),0)
Character.Wave.Shockwave:Play()
game:GetService('Debris'):AddItem(Wave,1)
wait(0.1)
end;
end);
while wait() do
MagicCircle1.CFrame = MagicCircle1.CFrame * CFrame.Angles(.1,0,0)
MagicCircle2.CFrame = MagicCircle2.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle3.CFrame = MagicCircle3.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle4.CFrame = MagicCircle4.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle5.CFrame = MagicCircle5.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle6.CFrame = MagicCircle6.CFrame * CFrame.Angles(0.1,0,0)
MagicCircle7.CFrame = MagicCircle7.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle8.CFrame = MagicCircle8.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle9.CFrame = MagicCircle9.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle10.CFrame = MagicCircle10.CFrame * CFrame.Angles(-0.1,0,0)
MagicCircle11.CFrame = MagicCircle11.CFrame * CFrame.Angles(0.1,0,0)
end;
end);
local BeamBall = MagicParts[13]:Clone()
BeamBall.Parent = Character
BeamBall.CFrame = Character.Torso.CFrame * CFrame.new(0,90,0)
Character.BeamBall.Charge:Play()
local Beam = MagicParts[12]:Clone()
Beam.Parent = Character
Beam.CFrame = Character.Torso.CFrame * CFrame.new(0,90,0)
Beam.Rotation = Vector3.new(180,0,90)
Character.Beam.Blast:Play()
local BlastTip = MagicParts[15]:Clone()
BlastTip.Parent = Character
BlastTip.CFrame = Character.Torso.CFrame * CFrame.new(0,90,0)
BlastTip.Rotation = Vector3.new(180,0,90)
wait(1)
for i = 1,20 do
BeamBall.Size = BeamBall.Size + Vector3.new(1,1,1)
wait()
end;
wait(1)
for i = 1,250 do
Beam.Size = Beam.Size + Vector3.new(5,0,0)
Beam.CFrame = Beam.CFrame + Vector3.new(0,2.5,0)
BlastTip.CFrame = BlastTip.CFrame + Vector3.new(0,5,0)
wait()
end
spawn(function()
while AirWaves do
local AirWave = MagicParts[16]:Clone()
AirWave.Parent = Character
AirWave.CFrame = Character.Torso.CFrame * CFrame.new(0, 1362.198, 18)
AirWave.Rotation = Vector3.new(90,0,180)
game:GetService('Debris'):AddItem(AirWave, 3)
wait(0.3)
end;
end);
wait(10)
for i = 1,100 do
Beam.Size = Beam.Size * Vector3.new(1,1.1,1.1)
Beam.Transparency = i/50
wait()
BeamBall.Size = BeamBall.Size - Vector3.new(1,1,1)
end;
spawn(function()
if Beam.Transparency >= 0.9 then
Beam:Destroy()
end;
end);
AttackMode = false
AirWaves = false
if AttackMode == false then
for i = 1,50 do
MagicCircle1.Size = MagicCircle1.Size - Vector3.new(0,2,2)
MagicCircle2.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle2.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle3.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle4.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle5.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle6.Size = MagicCircle2.Size - Vector3.new(0,1.5,1.5)
MagicCircle7.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle8.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle9.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle10.Size = MagicCircle2.Size - Vector3.new(0,0.25,0.25)
MagicCircle11.Size = MagicCircle2.Size - Vector3.new(0,0.75,0.75)
wait()
end;
MagicCircle1:Destroy()
MagicCircle2:Destroy()
MagicCircle3:Destroy()
MagicCircle4:Destroy()
MagicCircle5:Destroy()
MagicCircle6:Destroy()
MagicCircle7:Destroy()
MagicCircle8:Destroy()
MagicCircle9:Destroy()
MagicCircle10:Destroy()
MagicCircle11:Destroy()
Character.Torso.Anchored = false
Character.Head.Anchored = false
Character["Right Arm"].Anchored = false
Character["Left Arm"].Anchored = false
Character["Right Leg"].Anchored = false
Character["Left Leg"].Anchored = false
end;
end;
end);
end;
end);



Mouse.KeyUp:connect(function(Key)
if Key:lower() == "x" then
Hold = false
end;
end)


print(#noobs)
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 03:00 PM
The statement is near the end of the code.


print(#noobs)
Report Abuse
Pxkez is not online. Pxkez
Joined: 24 Sep 2015
Total Posts: 1066
11 Jun 2016 03:02 PM
for i = 1,100 do
Beam.Size = Beam.Size * Vector3.new(1,1.1,1.1)
Beam.Transparency = i/50
BeamBall.Size = BeamBall.Size - Vector3.new(1,1,1)
if i/50>1 then
BeamBall:Destroy()
break
wait()
end;
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 03:15 PM
That broke the entire script. :/. Its fine guys ill fix this one myself.


print(#noobs)
Report Abuse
Isaac020717 is not online. Isaac020717
Joined: 20 Jun 2014
Total Posts: 66
11 Jun 2016 03:19 PM
if Beam.Transparency > 1 then
Beam:Destroy()
end;

you have that ^
try this v

if Beam.Transparency >= 1 then
Beam:remove()
end
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jun 2016 03:20 PM
If :remove() works I'll be very surprised.

You shouldn't use it. Use :destoy() pretty much always.


Report Abuse
Isaac020717 is not online. Isaac020717
Joined: 20 Jun 2014
Total Posts: 66
11 Jun 2016 03:22 PM
I also removed the semicolon after the end ->(end;)<- I have never seen that before, would that even make a difference?
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jun 2016 03:23 PM
I see it a lot, and I have no idea why people do it. I'm uninformed, but I think it doesn't matter.

And typically if it doesn't matter, it's best to leave it out altogether and discount it as an impurity.


Report Abuse
Isaac020717 is not online. Isaac020717
Joined: 20 Jun 2014
Total Posts: 66
11 Jun 2016 03:24 PM
yeah
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
11 Jun 2016 03:44 PM
Didnt work. I dont see what the problem is. The statement is alone. I'v lost brain cells because of this.


print(#noobs)
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