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
 

Re: Somebody help me witht these!

Previous Thread :: Next Thread 
YaYaBinks3 is not online. YaYaBinks3
Joined: 05 Jun 2009
Total Posts: 2631
12 Aug 2011 01:15 AM
This is the first script in the button, values are stocked up but this isn't working.

function onClicked()

if game.Workspace.CheesePValue.howmuch.Value > 0 and game.Workspace.BoxesValue.howmuch.Value > 0 then

script.Parent.BrickColor = BrickColor.new(21)
game.Workspace.CheesePValue.howmuch.Value = game.Workspace.CheesePValue.howmuch.Value-1
game.Workspace.BoxValue.howmuch.Value = game.Workspace.BoxValue.howmuch.Value-1
game.Workspace.ohnocheesep.Decal.Transparency = "1"

local p = Instance.new("Part")
p.Name = "CheesePizzaBox"
p.Size = Vector3.new(5, 1.2, 5)
p.Position = Vector3.new(152, 4.6, -205)
p.Parent = game.Workspace
p.BrickColor = BrickColor.new(1001)

local d = Instance.new("Decal")
d.Texture = "http://www.roblox.com/asset/?id=59073213"
d.Face = "Top"
d.Parent = p

local m = Instance.new("BlockMesh")
m.Parent = p

wait(1)
script.Parent.BrickColor = BrickColor.new(37)

end
end

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

2nd:

function onClicked()

if game.Workspace.CheesePValue.howmuch.Value == 0 and game.Workspace.BoxValue.howmuch.Value == 0 then

script.Parent.BrickColor = BrickColor.new(21)
script.Parent.Parent.Parent.Name = "Cheese Pizzas and Boxes needed!"
game.Workspace.ohnocheesep.Decal.Transparency = "0"
game.Workspace.ohnoboxes.Decal.Transparency = "0"
wait(2)
script.Parent.BrickColor = BrickColor.new(37)
script.Parent.Parent.Parent.Name = "Box Cheese Pizza"
game.Workspace.ohnocheesep.Decal.Transparency = "0"
game.Workspace.ohnoboxes.Decal.Transparency = "0"

end
end

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

3rd

function onClicked()

if game.Workspace.CheesePValue.howmuch.Value == 0 then

script.Parent.BrickColor = BrickColor.new(21)
script.Parent.Parent.Parent.Name = "Cheese Pizzas needed!"
game.Workspace.ohnocheesep.Decal.Transparency = "0"
wait(2)
script.Parent.BrickColor = BrickColor.new(37)
script.Parent.Parent.Parent.Name = "Box Cheese Pizza"
game.Workspace.ohnocheesep.Decal.Transparency = "0"

end
end

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

4th

function onClicked()

if game.Workspace.BoxValue.howmuch.Value == 0 then

script.Parent.BrickColor = BrickColor.new(21)
script.Parent.Parent.Parent.Name = "Boxes needed!"
game.Workspace.ohnoboxes.Decal.Transparency = "0"
wait(2)
script.Parent.BrickColor = BrickColor.new(37)
script.Parent.Parent.Parent.Name = "Box Cheese Pizza"
game.Workspace.ohnoboxes.Decal.Transparency = "0"

end
end

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


I need some help with all this.
The values are all above 0 and I am worried about the 'if' bit with 'and' in it.
HELP!
Report Abuse
YaYaBinks3 is not online. YaYaBinks3
Joined: 05 Jun 2009
Total Posts: 2631
12 Aug 2011 01:16 AM
*Typo in title

!FLOODCHECK!
Report Abuse
YaYaBinks3 is not online. YaYaBinks3
Joined: 05 Jun 2009
Total Posts: 2631
12 Aug 2011 01:22 AM
Bump.
Report Abuse
YaYaBinks3 is not online. YaYaBinks3
Joined: 05 Jun 2009
Total Posts: 2631
12 Aug 2011 01:26 AM
16 views and no posts? IS THIS ALL TOO HARD FOR YOU? O_o
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
12 Aug 2011 01:28 AM
When we see the script, we say, "Oh, this is too long to fix. I'll go fix the shorter ones first."
Report Abuse
YaYaBinks3 is not online. YaYaBinks3
Joined: 05 Jun 2009
Total Posts: 2631
12 Aug 2011 01:29 AM
k. :(
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
12 Aug 2011 01:30 AM
My point was, only post the lines that are troubling you, that the output gives errors on, not the whole script. Try putting in some prints as a milestone checker.
Report Abuse
Fredfishy is not online. Fredfishy
Joined: 21 Mar 2009
Total Posts: 4197
12 Aug 2011 02:19 AM
What's the output?
Also, I don't think decal transparency works....does it?
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