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: Cant reload fully.

Previous Thread :: Next Thread 
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
17 Sep 2016 12:04 PM
local ReloadIncrement = -0.1

for i = Reload.Value,0,ReloadIncrement do
wait(math.abs(ReloadIncrement))
Reload.Value = math.floor((i * 10) + 0.5) / 10
end

Whenever i set the reload time to under 4.5 seconds it reloads until it hits 0.1 and stops(doesnt reload fully).
Report Abuse
Monadic is not online. Monadic
Joined: 03 Aug 2016
Total Posts: 731
17 Sep 2016 12:08 PM
"local ReloadIncrement = -0.1"
Are you an idiot?
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
17 Sep 2016 12:12 PM
Thanks man. I guess i didnt want help after all.
Report Abuse
Monadic is not online. Monadic
Joined: 03 Aug 2016
Total Posts: 731
17 Sep 2016 12:13 PM
It's okay. I can see you're new to this whole thing.
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
17 Sep 2016 12:14 PM
You don't have a negative increment in a for loop. Just have it positive and use negative i inside the loop.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
17 Sep 2016 12:18 PM
@Mister
local ReloadIncrement = 0.1

for i = Reload.Value,0,ReloadIncrement do
wait(ReloadIncrement)
Reload.Value = math.floor((-i * 10) + 0.5) / 10
end

I cant tell if this was what you are saying but from here i cant tell it wont do anything at all. Btw it was reloading fine when the total time it takes was above 4.5.
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
17 Sep 2016 12:21 PM
I wasn't saying anything.

This is just a math problem, you just need to look at it in a way so that it makes sense so you're not just trying random things until it works.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
17 Sep 2016 12:22 PM
i can* tell it wont do anything at all.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
17 Sep 2016 12:26 PM
ugh whatever. I've said it only doesn't work when I turn the reload time under 4.5 seconds but you arent getting it.
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
17 Sep 2016 12:28 PM
Like I said, it's a math problem. You need to look at the code and figure out WHY it wont work for values under 4.5 seconds. Derive the solution from that and fix the code accordingly.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
17 Sep 2016 12:32 PM
I've been looking at it since I found it(about 2-3 months ago). I'm asking because I have no idea. I'm not looking for moral support.
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
17 Sep 2016 12:34 PM
I'm not giving you any. If you found the code somewhere else you should probably rewrite it so it makes sense.
Report Abuse
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
17 Sep 2016 12:35 PM
I don't know the context of the code, so it doesn't make sense to me either.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
17 Sep 2016 12:39 PM
I wrote it. It's for a tank game, if you want more context you can go to K'nats on my profile.
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