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
 

Simple script failing

Previous Thread :: Next Thread 
goodnamesalltaken is not online. goodnamesalltaken
Joined: 20 Mar 2010
Total Posts: 19799
12 Oct 2011 07:27 PM
Normally I would fix this up myself, but it freezes the game if I unpause time for unknown reasons

Made it from scratch, so yeah. :/

Script 1: Button you click to activate the bomb timer
-----------------------------------------------------------

function onClicked()
if script.Parent.C4.Transparency ~= 0 then
script.Parent.Placed.Value = true
script.Parent.Name = Head
script.Parent.ExScript.Disabled = false
elseif script.Parent.C4.Transparency ~= 1 then
script.Parent.Placed.Value = false
script.Parent.Time.Value = 120
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)



------------------------------------------------------------

Script 2: Actual bomb countdown/shutdown
------------------------------------------------------------
while true do
if script.Parent.Placed.Value == true then
if script.Parent.Time.Value > 1 then
wait(1)
script.Parent.Time.Value = script.Parent.Time.Value - 1
t = script.Parent.Time.Value
script.Parent.Parent.Name = ""..t.." Seconds"
elseif script.Parent.Time.Value == 1 then
explosion = Instance.new("Explosion")
explosion.Position = script.Parent.Position
explosion.BlastRadius = 10
explosion.Parent = script.Parent
end
elseif script.Parent.Placed.Value == false then
script.Parent.ExScript.Disabled = true
end
end
--------------------------------------------------------------




Any ideas?
Report Abuse
Lowcart is not online. Lowcart
Joined: 12 Sep 2011
Total Posts: 1323
12 Oct 2011 07:29 PM
[ Content Deleted ]
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
12 Oct 2011 07:30 PM
^ That won't fix the script. That just makes it shorter and look better.

Regards,
~Scarfacial
Report Abuse
Lowcart is not online. Lowcart
Joined: 12 Sep 2011
Total Posts: 1323
12 Oct 2011 07:31 PM
[ Content Deleted ]
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
12 Oct 2011 07:32 PM
Not really....

Unless of course the 2 conditions before the wait aren't being fulfilled.

Regards,
~Scarfacial
Report Abuse
Lowcart is not online. Lowcart
Joined: 12 Sep 2011
Total Posts: 1323
12 Oct 2011 07:35 PM
[ Content Deleted ]
Report Abuse
goodnamesalltaken is not online. goodnamesalltaken
Joined: 20 Mar 2010
Total Posts: 19799
12 Oct 2011 07:41 PM
I just realized another fail I made at the same time

I had it run based off of the decal's transparency, yet I never made a line changing the transparency of the decal...
Report Abuse
goodnamesalltaken is not online. goodnamesalltaken
Joined: 20 Mar 2010
Total Posts: 19799
12 Oct 2011 07:44 PM
And I forgot to make the renaming of Part a string value

I feel like an idiot in the end every time I do scripts from scratch :/
Report Abuse
firedragon1doe1 is not online. firedragon1doe1
Joined: 07 Jun 2011
Total Posts: 17
12 Oct 2011 08:24 PM
Say create/kick edit/kick remove kick.Then game.Players.Noob:remove()
Report Abuse
fireguy147 is not online. fireguy147
Joined: 21 Sep 2011
Total Posts: 146
12 Oct 2011 09:05 PM
firedragon1doe1 script rocks!
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