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: How to do this?

Previous Thread :: Next Thread 
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
04 Aug 2015 05:05 PM
So, I'm making a like/dislike bar for my game, but, something is wrong here.

When I enter this code "script.Parent.LikeRatio.Bar.Size = UDim2.new((script.Parent.Likes.Value/script.Parent.Dislikes.Value), 0, 1, 0)", the likes/dislikes bar sometimes go off balance and in crazy distances off the GUI. How do I make it a ratio to 1 and keep it on the grid?
Report Abuse
lokkut is not online. lokkut
Joined: 18 Mar 2009
Total Posts: 1794
04 Aug 2015 05:05 PM
(script.Parent.Likes.Value/script.Parent.Dislikes.Value)

should be

(script.Parent.Likes.Value/(script.Parent.Likes.Value+script.Parent.Dislikes.Value))
Report Abuse
vacha is not online. vacha
Joined: 06 Jan 2011
Total Posts: 1993
04 Aug 2015 05:06 PM
script.Parent.LikeRatio.Bar.Size = UDim2.new((script.Parent.Likes.Value/(script.Parent.Likes.Value + script.Parent.Dislikes.Value)), 0, 1, 0)

Since the value is scaled, you have to make it out of the total likes + dislikes
while true do the do
Report Abuse
someonedie is not online. someonedie
Joined: 19 Mar 2011
Total Posts: 1710
04 Aug 2015 05:11 PM
Thanks guys.
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