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: Sliding bar...

Previous Thread :: Next Thread 
BogyMac is not online. BogyMac
Joined: 04 Nov 2011
Total Posts: 823
05 Mar 2014 10:14 PM
I'm trying to create a TextButton that, when clicked, acts as a slider that can only move in the Y direction. I am unsure how to do this, but here is my script so far:

dragging = false

script.Parent.DragBegin:connect(function(pos)
dragging = true

while dragging == true do
if script.Parent.Position.X.Offset < 9 or script.Parent.Position.X.Offset > 9 then
--???
end
wait()
end
end)

script.Parent.DragStopped:connect(function(pos)
dragging = false
end)



Thanks for any help,
-Bogy
Report Abuse
BogyMac is not online. BogyMac
Joined: 04 Nov 2011
Total Posts: 823
05 Mar 2014 10:23 PM
bump
Report Abuse
BogyMac is not online. BogyMac
Joined: 04 Nov 2011
Total Posts: 823
05 Mar 2014 10:30 PM
ppl, y u no post helpful reply? :P
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
05 Mar 2014 10:34 PM
I culd but dis luks liek it bel0ngs 1n an0ther f0rum
Report Abuse
BogyMac is not online. BogyMac
Joined: 04 Nov 2011
Total Posts: 823
05 Mar 2014 10:36 PM
In case you didn't know, this is the correct forum. I am not asking for an entire script, I am just asking how you would go about creating a slider.

So before you try to be sarcastic and quote me on things I said, make sure it makes sense first.

-Bogy
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
05 Mar 2014 10:37 PM
This belongs here, alright. He's asking how he'd script a textbutton to be moveable in only one direction. I'd suggest ripping apart a script that does that (eg the terrain plugin or somethin), then seeing how they do it.
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
05 Mar 2014 10:41 PM
"Don't ask others to debug your broken code without giving a hint what sort of problem you are having. Posting a few hundred lines of code, saying "it doesn't work", will get you ignored. Posting a dozen lines of code, saying "after line 7 I was expecting to see (something), but (something else) happened instead" is much more likely to get you a reply."

this says the forum is for debugging scripts not help creating them.

Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
05 Mar 2014 10:43 PM
This belongs here.

@OP
Do you want a SCROLL bar or a TICKER bar?
Report Abuse
BogyMac is not online. BogyMac
Joined: 04 Nov 2011
Total Posts: 823
05 Mar 2014 10:46 PM
A Scrolling bar that only moves in the Y direction that cannot be moved beyond a certain limit.

Example of this is in Windows/Other OS if you have a list of items in a folder too large to show a scroll bar will appear that allows you to move the list up and down.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
05 Mar 2014 10:47 PM
Just making sure, as a slider is something that is completely different from a scroll bar.

If you wait a bit, I'm building a Scrollbar class so you only have to connect a Scroll event. You can see the source, too, so you can look at the raw events that I used, too.
Report Abuse
TimeCruiser is not online. TimeCruiser
Joined: 24 Oct 2008
Total Posts: 134
05 Mar 2014 11:30 PM
I have not used it (yet), so I do not know if it works well, but there is a model by Ananimus that seems like it has what you are looking for: www.roblox.com/SlideBar-Control-item?id=33312050
Report Abuse
drahsid5 is not online. drahsid5
Joined: 13 May 2011
Total Posts: 3937
05 Mar 2014 11:39 PM
something like

mouse = game.Players.LocalPlayer:GetMouse()
TextBoxx = script.Parent
Val = script.Parent.Parent
function onClick()
local MinY = 0
local MaxY = 0.5
TextBox.Position.y = mouse.hit.p
if TextBox.Position.y < MinY then TextBox.Position.y = MinY
elseif TextBox.Position.y > MaxY then TextBox.Position.y = MaxY
end
Val = TextBox.Position.y*10

mouse.Mousebutton1Click:connect(onClick)
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
06 Mar 2014 02:32 AM
http://www.roblox.com/RbxScrollbar-Library-item?id=148646845
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