KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 06:14 PM |
is this right?
local Positions = {"0,.25","0.50","0,75","0,1"} player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect (function () -- gui connection player.PlayerGUI.ScreenGui.Frame.Textbutton.Position = UDim2.new (0,1,0,1) -- UDim is how to make a new position/size, just like Vector3, except it's 2 cordinate graphs, also 0,0 is on the top right, not top left! player.PlayerGUI.ScreenGui.Frame.Textbutton.Position (math.random (0,1),math.random(0,1),math.random(0,1),math.random(0,1)) player.PlayerGUI.ScreenGui.Frame.Textbutton.Position (math.random [#Positions]) end)
please fix |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 26 Nov 2013 06:15 PM |
| (Oops, was referring to "is this right?") |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 06:15 PM |
| ok, how can i make it right? lol |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2013 06:16 PM |
I don't even know where to begin.
Could I suggest you start with something simpler, because you obviously have not grasped the basics of Lua yet to be able to move onto something as 'advanced' as this. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 07:42 PM |
Get out, idiot! I'm asking for help, not discouragment.
Anyways, I guess it's to advanced for you to answer, I understand |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 07:45 PM |
Please help someone. I think it hhs to do with
player.PlayerGUI
and the math.random
so eplase help |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
| |
|
|
| 26 Nov 2013 08:06 PM |
player.PlayerGUI.ScreenGui.Frame.Textbutton.Position (math.random (0,1),math.random(0,1),math.random(0,1),math.random(0,1))
Look at it. |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2013 08:06 PM |
1. It's PlayerGui, not PlayerGUI. 2. No = sign |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2013 08:08 PM |
local Positions = {"0,.25","0.50","0,75","0,1"}
not sure if some of the commas were on purpose or not |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2013 08:09 PM |
player.PlayerGUI.ScreenGui.Frame.Textbutton.Position (math.random [#Positions])
Again, no = sign.
You also called a function incorrectly. |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 08:16 PM |
wahts this suppposed to mean:
no = sign. |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2013 08:19 PM |
no = sign means you don't have an equals mark where there is supposed to be one.
You need "=" to assign values.
http://wiki.roblox.com/index.php/Absolute_beginner%27s_guide_to_scripting |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 08:48 PM |
| the way he worded it, AND im not a absolute begiginer |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 08:53 PM |
| how should I call that function? |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 09:02 PM |
| LOL I forgot for a few of them, so u call me an absolute beginner? What da heck |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2013 09:11 PM |
local Positions = {"0.25","0.50","0.75","0.1"} player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function () -- gui connection player.PlayerGui.ScreenGui.Frame.Textbutton.Position = UDim2.new(0,1,0,1) -- 0,0,0,0 starts at top left corner player.PlayerGui.ScreenGui.Frame.Textbutton.Position = (math.random(0,1),math.random(0,1),math.random(0,1),math.random(0,1)) player.PlayerGui.ScreenGui.Frame.Textbutton.Position = (math.random(1,#Positions)) end) |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 09:11 PM |
local Positions = {"0,.25","0.50","0,75","0,1"} player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect (function () -- gui connection player.PlayerGui.ScreenGui.Frame.Textbutton.Position = UDim2.new (0,1,0,1) -- UDim is how to make a new position/size, just like Vector3, except it's 2 cordinate graphs, also 0,0 is on the top right, not top left! player.PlayerGui.ScreenGui.Frame.Textbutton.Position = UDim2.new (math.random (0,1),math.random(0,1),math.random(0,1),math.random(0,1)) player.PlayerGui.ScreenGui.Frame.Textbutton.Position = UDim2.new (math.random [#Positions]) end)
I know that last part is broken! |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 26 Nov 2013 09:13 PM |
What do you mean by: local Positions = {"0,.25","0.50","0,75","0,1"} ?
As in, 0,.25 and 0,.50? Or?
|
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 09:16 PM |
lol, when did those get there?
local Positions = {"0.25","0.50","0.75","0.1"} |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 09:17 PM |
| How do I fix the last part is my question! the math.random from the table |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 26 Nov 2013 09:18 PM |
| Positions[math.random(#Positions)] though I don't know if this will work I didn't look over the full script |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 26 Nov 2013 09:58 PM |
Like this?
local Positions = {"0.25","0.50","0.75","0.1"} player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect (function () -- gui connection player.PlayerGui.ScreenGui.Frame.Textbutton.Position = UDim2.new (0,1,0,1) -- UDim is how to make a new position/size, just like Vector3, except it's 2 cordinate graphs, also 0,0 is on the top right, not top left! player.PlayerGui.ScreenGui.Frame.Textbutton.Position = UDim2.new (math.random (0,1),math.random(0,1),math.random(0,1),math.random(0,1)) player.PlayerGui.ScreenGui.Frame.Textbutton.Position = UDim2.new (Position (math.random [#Positions])) end) |
|
|
| Report Abuse |
|
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 27 Nov 2013 03:39 AM |
| I think the function is wrong, when I click, this does not do ANYTHING |
|
|
| Report Abuse |
|
|