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: mouse click

Previous Thread :: Next Thread 
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:23 PM
i dont know about this but is there like a mousehover for like a part in workspace?


that could like pop up a UI when hovered over in-game


i dont need a siggy
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
14 Sep 2015 07:26 PM
http://wiki.roblox.com/index.php?title=API:Class/ClickDetector

otherwise do something that checks every time when the mouse moves if it is hovering over a part, and then checking if that part is your specific part

UserInputService

InputChanged

MouseMovement
Report Abuse
DeathsLASTwords is not online. DeathsLASTwords
Joined: 28 Jan 2012
Total Posts: 2701
14 Sep 2015 07:27 PM
amanda i love you
Report Abuse
SaveDaTurtlesMan is not online. SaveDaTurtlesMan
Joined: 09 Dec 2013
Total Posts: 260
14 Sep 2015 07:28 PM
I make a GUI that has a offset from the mouse but follows the mouse. I fire this when

script.Parent.ClickDetector.HoverEnter:connect(function(player)
end)

and also use

script.Parent.ClickDetector.HoverLeave:connect(function(player)
end)
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:29 PM
I dont mean click detector, I just mean like in Guis how you can connect mouserover can you do that inside of workspace


i dont need a siggy
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:29 PM
@save so I need to fire that when the Gui is hovered over?


i dont need a siggy
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
14 Sep 2015 07:29 PM
I told you the answer. If you don't like click detectors, then you have to make your own, preferably using UserInputService.
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:30 PM
alright then


i dont need a siggy
Report Abuse
SaveDaTurtlesMan is not online. SaveDaTurtlesMan
Joined: 09 Dec 2013
Total Posts: 260
14 Sep 2015 07:37 PM
For a GUI use

script.Parent.MouseHoverEnter:connect(function()
end)

script.Parent.MouseHoverLeave:connect(function()
end)
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:38 PM
nono not for a Gui, a click detector or a brick mouse hover/enter and leave



idk how to explain it but amanda said to use imputservice


i dont need a siggy
Report Abuse
SaveDaTurtlesMan is not online. SaveDaTurtlesMan
Joined: 09 Dec 2013
Total Posts: 260
14 Sep 2015 07:39 PM
I told you, for a click detector do

script.Parent.ClickDetector.HoverEnter:connect(function(player)
end)

and also use

script.Parent.ClickDetector.HoverLeave:connect(function(player)
end)
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
14 Sep 2015 07:39 PM
a combination of magnitude and raycasting would achieve this

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:39 PM
ok thank you


i dont need a siggy
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
14 Sep 2015 07:39 PM
scratch that, hoverenter exists

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
SaveDaTurtlesMan is not online. SaveDaTurtlesMan
Joined: 09 Dec 2013
Total Posts: 260
14 Sep 2015 07:41 PM
I did this in one of my games:

function e(entered)
if running == false then
if (entered.Character.Torso.Position - clickpart.Position).magnitude <= clickdetector.MaxActivationDistance then
running = true
local g = Instance.new("ScreenGui",entered.PlayerGui)
g.Name = "Identity"
local g1 = Instance.new("TextLabel",g)
g1.FontSize = Enum.FontSize.Size14
g1.Font = Enum.Font.Arial
g1.BackgroundTransparency = 1
g1.TextColor3 = Color3.new(1,1,1)
g1.BackgroundColor3 = Color3.new(0,0,0)
g1.BorderSizePixel = 0
g1.Size = UDim2.new(0,50,0,20)
script.FollowMouse:Clone().Parent = g1
g1.FollowMouse.Disabled = false
g1.Name = "TalkToText"
g1.Text = "Talk To "..script.Parent.Name
end
end
end
clickdetector.MouseHoverEnter:connect(e)

function l(left)
if running == true and left.PlayerGui:FindFirstChild("Identity") ~= nil then
left.PlayerGui:FindFirstChild("Identity"):Destroy()
running = false
end
end
clickdetector.MouseHoverLeave:connect(l)

Inside this script is a local script that is this:

--SaveDaTurtlesMan

while true do
script.Parent.Position = UDim2.new(0,game.Players.LocalPlayer:GetMouse().X + script.Parent.Size.X.Offset / 4,0,game.Players.LocalPlayer:GetMouse().Y)
wait(.01)
end
Report Abuse
ikiled is not online. ikiled
Joined: 15 Jun 2012
Total Posts: 575
14 Sep 2015 07:42 PM
perfect ty


i dont need a siggy
Report Abuse
SaveDaTurtlesMan is not online. SaveDaTurtlesMan
Joined: 09 Dec 2013
Total Posts: 260
14 Sep 2015 07:45 PM
No Problem.
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