iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
|
| 22 Dec 2013 07:56 PM |
RightClickGuiMenu = game.Workspace.ScreenGui mouse = game.Players.LocalPlayer:GetMouse() mouse.Button2Down:connect(function() if mouse.Target:IsA('BasePart') then RightClickGuiMenu = game.Players.LocalPlayer.PlayerGui RightClickGuiMenu.Position = UDim2.new(RightClickGuiMenu.Position.Scale.X, mouse.X, RightClickGuiMenu.Position.Scale.Y, mouse.Y) end end)
basically, when i right click on the mouse, a gui will pop up at the position of the mouse
also, the screengui will be in the workspace and then re-parent to the playergui folder |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 07:58 PM |
if mouse.Target and mouse.Target:IsA('BasePart') then
|
|
|
| Report Abuse |
|
|
iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
|
| 22 Dec 2013 08:03 PM |
Okay, then the command prompt says " LocalPlayers is not a valid member of Players"
What does this mean? |
|
|
| Report Abuse |
|
|
Powmonkey
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 35292 |
|
|
| 22 Dec 2013 08:10 PM |
Hi valiant.
#COMRADEPOWPOWER |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 08:15 PM |
| It means you aren't using a local script |
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 22 Dec 2013 08:17 PM |
nos
It means that he said LocalPlayers.
It should be LocalPlayer not LocalPlayers. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 08:20 PM |
"RightClickGuiMenu = game.Workspace.ScreenGui mouse = game.Players.LocalPlayer:GetMouse() mouse.Button2Down:connect(function() if mouse.Target:IsA('BasePart') then RightClickGuiMenu = game.Players.LocalPlayer.PlayerGui RightClickGuiMenu.Position = UDim2.new(RightClickGuiMenu.Position.Scale.X, mouse.X, RightClickGuiMenu.Position.Scale.Y, mouse.Y) end end)"
There is no "LocalPlayers" there |
|
|
| Report Abuse |
|
|
iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
|
| 22 Dec 2013 08:21 PM |
wait, it needs to be in a localscript? or script?
because i tried both and it doesnt work |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 22 Dec 2013 08:21 PM |
| A LocalScript placed in StarterPack or StarterGui. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 08:22 PM |
Also, "RightClickGuiMenu = game.Workspace.ScreenGui" Should be "RightClickGuiMenu = game.ScreenGui" |
|
|
| Report Abuse |
|
|
qrrrq
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 1252 |
|
|
| 22 Dec 2013 08:23 PM |
| Oh, I thought that when he typed 'LocalPlayers' that it was in there, whoops. |
|
|
| Report Abuse |
|
|
iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
|
| 22 Dec 2013 08:25 PM |
@cnt
what? then where does the screengui go? |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 22 Dec 2013 08:25 PM |
| Are you trying to Parent RightClickGuiMenu in to their PlayerGui? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 08:26 PM |
Wait, never mind I read that wrong.
This is your real problem: "RightClickGuiMenu = game.Players.LocalPlayer.PlayerGui RightClickGuiMenu.Position = UDim2.new(RightClickGuiMenu.Position.Scale.X, mouse.X, RightClickGuiMenu.Position.Scale.Y, mouse.Y)"
The PlayerGui object doesn't have a position property |
|
|
| Report Abuse |
|
|
iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
| |
|
iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
|
| 22 Dec 2013 08:31 PM |
| then should i make the new RightClickMenuGui's parent workspace, then instance new it to the player gui? |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 22 Dec 2013 08:32 PM |
I hate it when people use literally like that
if that title was literal then you'd have a grenade with the pin pulled next to your head, not a dumb script error |
|
|
| Report Abuse |
|
|
iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
|
| 22 Dec 2013 08:33 PM |
| i hate it when people randomly spam on my thread |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 22 Dec 2013 08:34 PM |
Dude
are you 8? Do you even understand what spam is? or what literally means? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 08:36 PM |
cold, you are spamming. You are posting irrelevant text on this thread |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 22 Dec 2013 08:40 PM |
I made one comment about the inncorrect use of the world literally
that's not spam, it's only spam if you make it spam. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Dec 2013 08:41 PM |
"it's only spam if you make it spam." No, that's not how it works.
When you kill someone, is it only murder if you make it murder? No, it's murder. |
|
|
| Report Abuse |
|
|
iValianT
|
  |
| Joined: 21 Aug 2010 |
| Total Posts: 58381 |
|
|
| 22 Dec 2013 08:42 PM |
| You did not talk about scripting in that post when the thread title clearly says "script help". That is spam. |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 22 Dec 2013 08:42 PM |
no because murder is a solidly defined thing
spam is perceived and based on opinion in most cases. |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 22 Dec 2013 08:44 PM |
| "Forum spam consists of posts on Internet forums that contain unrelated advertisements, links to malicious websites, and abusive or otherwise unwanted information." |
|
|
| Report Abuse |
|
|