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: Mouse Positions..

Previous Thread :: Next Thread 
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
15 Dec 2012 02:22 PM
I made this script, and I want it to be at the mouses exact position. However it is always below it..

Here is the script..

xp = script.Parent.Team1
px = script.Parent.Team2
desc1 = Instance.new("TextLabel")
desc1.Visible = false
desc2 = Instance.new("TextLabel")
desc2.Visible = false
plr = game.Players.LocalPlayer
weapon1 = game.Lighting.GunName1:clone()
weapon2 = game.Lighting.GunName2:clone()

function unhovered1()
desc1.Visible = false
end

function unhovered2()
desc2.Visible = false
end

function hovered1()
desc1.Text = "Description Here"
desc1.Parent = script.Parent
desc1.Position = UDim2.new(0, 0 + plr:GetMouse().X) + UDim2.new(0, 0, 0, 0 + plr:GetMouse().X) -- trololol
desc1.Visible = true
end

function hovered2()
desc2.Text = "Description Here"
desc2.Parent = script.Parent
desc2.Position = UDim2.new(0, 0 + plr:GetMouse().X) + UDim2.new(0, 0, 0, 0 + plr:GetMouse().X) -- trololol
desc2.Visible = true
end

function team1chosen()
plr.TeamColor = BrickColor.new("Bright red") -- change team color
plr.Character:BreakJoints()
weapon1.Parent = plr.Backpack
end

function team2chosen()
plr.TeamColor = BrickColor.new("Bright blue") -- change team color
plr.Character:BreakJoints()
weapon2.Parent = plr.Backpack
end

xp.MouseButton1Click:connect(team1chosen)
xp.MouseEnter:connect(hovered1)
xp.MouseLeave:connect(unhovered1)
px.MouseButton1Click:connect(team2chosen)
px.MouseEnter:connect(hovered2)
px.MouseLeave:connect(unhovered2)
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
15 Dec 2012 02:29 PM
Really? Ignoriing the thread.. Ignorance much?
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
15 Dec 2012 02:39 PM
Set the ZIndex higher than the things.

~ thedeathmaster01 | Scripter | Placemaker ~
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
15 Dec 2012 02:42 PM
.. How would I do that?
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
15 Dec 2012 03:47 PM
It's not ignorance. Just not many people want to read through tons of lines of code and figure out your problem.

ZIndex is a property under all UI objects
Report Abuse
crouton04 is not online. crouton04
Joined: 07 Jul 2010
Total Posts: 4459
15 Dec 2012 04:26 PM
I meant, what does he mean by set it higher then the things?
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