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: Good scripter, small script and doesn't work?

Previous Thread :: Next Thread 
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 04:36 AM
This is my script:

while true do
wait()
script.Parent.Value = script.Parent.Parent.CostT.Value*script.Parent.Parent.TotalCost.Value
if script.Parent.Value > 9 then
script.Parent.Parent.TCostR.Value = script.Parent.Parent.TCostR.Value+1
script.Parent.Value = script.Parent.Value-10
end
end

It works fine the first time, when TCostT (the parent) is higher then 9 (it was >=10 before that) then it does 1 more TCostR, but the secont time, TCostT becomes 10, 15, 20 and higher so it doesn't work anymore, I don't know what the problem is since there is nothing wrong.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 04:43 AM
I really need help with this .. it's for a big project.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
06 Aug 2014 04:49 AM
if script.Parent.Value > 9 then
Since you said script.Parent.Value becomes 10,15,20 then 9 will never become bigger than that.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 04:57 AM
No I mean the script works if it's higher then 9, when you click a certain button, the value goes +5, I work with RoBux and Tickets (in-game currency) so it should be

1 item:
0 RoBux, 5 Tickets
2 items:
1 RoBux, 0 Tickets
3 items:
1 RoBux, 5 Tickets

For these 3 things, it goes fine, untill I buy a 4th item, it goes like this
4 items:
1 RoBux, 10 Tickets.

It's supposed to be 2 Robux, 0 Tickets but it doesn't work the second time.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 05:27 AM
Bump

I really need help! I'm making a business simulator!
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 09:24 AM
bump

This is a future game guys! You may also tell me if you can't find what's wrong.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 09:31 AM
Nobody knows what's wrong with it? lol I knew there was nothing wrong but then why doesn't it work?
Report Abuse
CalvinRBLX is not online. CalvinRBLX
Joined: 25 Jun 2012
Total Posts: 308
06 Aug 2014 09:32 AM
while true do
wait()
script.Parent.Value = ?????script.Parent.Parent.CostT.Value*script.Parent.Parent.TotalCost.Value
if script.Parent.Value >= 9 then
script.Parent.Parent.TCostR.Value = script.Parent.Parent.TCostR.Value+1
script.Parent.Value = script.Parent.Value-10
end
end
Report Abuse
CalvinRBLX is not online. CalvinRBLX
Joined: 25 Jun 2012
Total Posts: 308
06 Aug 2014 09:33 AM
You are trying to give script.Parent.Value a nil value so that may be your issue.
Report Abuse
CalvinRBLX is not online. CalvinRBLX
Joined: 25 Jun 2012
Total Posts: 308
06 Aug 2014 09:33 AM
Nevermind, it's the way i copied and pasted it, hahaha.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 09:36 AM
You didn't change anything to the script but script.Parent.Value equals to script.Parent.Parent.CostT.Value*script.Parent.Parent.TotalCost.Value
and that works fine because in this 1, it first changes to 5 tickets, then to 10 tickets then to 15 tickets it's just 10 tickets should be 1 robux and 15 tickets hould be 1 robux and 5 tickets
That also works

But 20 tickets should be 2 robux and tht doesn't work.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 09:49 AM
Aw cmone, this is 1 of the most needed things in my game :/
Report Abuse
CalvinRBLX is not online. CalvinRBLX
Joined: 25 Jun 2012
Total Posts: 308
06 Aug 2014 09:51 AM
Find an alternate way. It's your mathematics, not the script that's broken.
Report Abuse
ediee544 is not online. ediee544
Joined: 24 Oct 2008
Total Posts: 2175
06 Aug 2014 09:52 AM
script.Parent.Value = script.Parent.Parent.CostT.Value*script.Parent.Parent.TotalCost.Value

What is the total cost value?
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 09:52 AM
I know another way but it might take a while, I first wanted to see if something else was wrong and no it's not my mathematics, it's just the way the script works.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 09:53 AM
TotalCost is the value of the items you want to buy, you can change that from 0 to 60
Report Abuse
CalvinRBLX is not online. CalvinRBLX
Joined: 25 Jun 2012
Total Posts: 308
06 Aug 2014 09:54 AM
The script works, the way you make it work.
As does your broken numeracy.
Report Abuse
ediee544 is not online. ediee544
Joined: 24 Oct 2008
Total Posts: 2175
06 Aug 2014 09:57 AM
Your script is very confusing, it's hard to tell what the problem just from looking at the code but I'm going to assume it has something to do with the 'script.Parent.Value =' and if 'script.Parent.Value > 9'
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
06 Aug 2014 10:04 AM
its cuz u cant script and cant maths
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 10:07 AM
I can script MUCH better then you and my maths are good, I found what's wrong and I'm trying to fix it so stfu.
I made 3 SCRIPTED games and they work fine.
Report Abuse
ediee544 is not online. ediee544
Joined: 24 Oct 2008
Total Posts: 2175
06 Aug 2014 10:10 AM
It's not a maths error, it's more like a integer input error, your values are wrong and we can't help you unless we see each value every step of the way.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
06 Aug 2014 10:12 AM
You cannot script better than me that is for sure.
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Aug 2014 11:13 AM
If I can't, where are your scripts or games huh? You don't know anything from me and I started scripting 3 years ago.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
06 Aug 2014 11:18 AM
"You don't know anything from me"
ofc not I did not learn anything from you lol since u cant script

"I started scripting 3 years ago"

I hate when people put time into these type of things.

Let's take an example.

One guy is a bad painter but has been painting for 10 years.
Another guy has been painting for 5 years.

So the bad painter never learned how to paint good and all he did was create slobs of garbage for the whole ten years he has been painting.
The other painter has been taught by numerous people, has learned multiple painting techniques and his art is beautiful.

Who's the better painter?
Unless your IQ is incredibly low(or you have given this deep thought, if so post your thoughts here), the better painter is the one painting for five years.

You can practice something all your life, but if you're practicing it wrong you are no better than a beginner.

Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
06 Aug 2014 11:19 AM
Where are my scripts?
All over this sub-forum.

If you want to test my "skills", tell me to create something.
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