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: Not multiplying by 1.5?

Previous Thread :: Next Thread 
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 08:20 AM
I was making a level and experience script, but whether I multiply the experience by 1.5 or not, the number stays the same. Here's my changed function for the KOsRound, which is the number of points you will get at the end of the round. I want you to get 1.5 times the amount of points.

va = v.Value
v.Changed:connect(function(val)
if val == 0 then va = val return end
ex.Value = ex.Value + math.floor((val-va)*1.5)
va = val
end)

This is not the whole script. The whole one is kinda long.
Report Abuse
neongoo51 is not online. neongoo51
Joined: 12 May 2009
Total Posts: 33061
13 Jun 2013 08:23 AM
If you're using an integer, the game will probably not accept the arthmetic operation since it probably returns a number with decimals in it.

Try multiplying a number, then transferring the result to an IntValue.

{ERROR: Signature.exe not found}
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 08:24 AM
Nevermind, I fixed it. I changed all the val to v.Value.
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 08:51 AM
More problems! Here's my changed function after the first one. Once the experience is at 10, it won't change the level until it gets higher than 10. Also, it is just setting the experience to 0.

ex.Changed:connect(function(val)
if ex.Value >= l.Value * 10 then
ex.Value = ex.Value - (l.Value*10)
l.Value = l.Value + 1
end
end)
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 09:18 AM
It works fine in play solo mode, but not in regular play mode. D:
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 09:43 AM
Hello?????????????
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
13 Jun 2013 09:50 AM
How is your .PlayerAdded event set up?
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 09:54 AM
There is that event with the argument p. First it creates the values, then the events.
Report Abuse
databrain is not online. databrain
Joined: 01 Jan 2013
Total Posts: 3342
13 Jun 2013 10:01 AM
when you do something.changed:connect(function(val)
I think val is the property, not the value.
Not too sure, but I'm pretty sure

Emerson wrote an essay on that
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 10:02 AM
I'm not using val. I'm using ex.Value.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
13 Jun 2013 10:05 AM
You need to hook up the .Changed event on the actual object, not the value property.


StringValue.Value.Changed:connect(function() end) --> Doesn't work

StringValue.Changed:connect(function() end) --> Does work
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 10:06 AM
I am.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
13 Jun 2013 10:08 AM
Post the entire script.
Report Abuse
databrain is not online. databrain
Joined: 01 Jan 2013
Total Posts: 3342
13 Jun 2013 10:12 AM
function ChangeLevel()
if ex.Value >= l.Value * 10 then
ex.Value = ex.Value - l.Value * 10
l.Value = l.Value + 1
if ex.Value >= l.Value * 10 then
ChangeLevel()
end
end
end
ex.Changed:connect(ChangeLevel)

That way if they earn 2 levels in one change, it will repeat the function.

I don't see anything wrong with this script, post the entire script.

Emerson wrote an essay on that
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 10:14 AM
It says there is a word too harsh in it. Idk why.
Report Abuse
databrain is not online. databrain
Joined: 01 Jan 2013
Total Posts: 3342
13 Jun 2013 10:16 AM
Also, you are gonna get your account disabled shortly after you posted that script then.
It's a stupid roblox bug

Emerson wrote an essay on that
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
13 Jun 2013 10:16 AM
@Data
Serious?
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 10:17 AM
Oh. That's not good. Also some of the words that are in that script are: K!lls, Di3d, K0s
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
13 Jun 2013 10:24 AM
Kills, Died, KOs?

Must be something else.
Report Abuse
databrain is not online. databrain
Joined: 01 Jan 2013
Total Posts: 3342
13 Jun 2013 10:29 AM
Look for words like P@@$word, or su1cid3

Emerson wrote an essay on that
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
13 Jun 2013 10:36 AM
What about sw0rds or pist0ls? Also, data, your script worked. :D
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