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
 

Getting Mouse

Previous Thread :: Next Thread 
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
06 Apr 2015 12:12 PM
The script is inserted into a player after they click a button

mouse = game.Players.LocalPlayer:GetMouse()

if mouse ~= nil then
print("Mouse has been found")
else
print("Error")
end

Report Abuse
TheComputerist is not online. TheComputerist
Joined: 28 Oct 2011
Total Posts: 695
06 Apr 2015 12:14 PM
Try this. Put it in a local script inside the button


local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

if mouse ~= nil then
print("Mouse has been found")
else
error("Error")
end
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
06 Apr 2015 12:18 PM
IT doesn't work still
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
06 Apr 2015 12:18 PM
It works in studio. But not in Regular
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
06 Apr 2015 12:19 PM
textbutton = TEXTBUTTONPATHGOESHERE

textbutton.MouseButton1Click:connect(function()
mouse = game.Players.LocalPlayer:GetMouse()
if mouse then
return true
else
return false
end
end)
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
06 Apr 2015 12:21 PM
The local script is inserted in the player
if mouse ~= nil then
print("Mouse has been found")
h = Instance.new("Hint",game.Workspace)
h.Text = "WORKS"
else
print("Error")
end


Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
06 Apr 2015 12:42 PM
Bump
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
06 Apr 2015 03:46 PM
Bump
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
12 Apr 2015 10:50 AM
b2
Report Abuse
PalomonCP is not online. PalomonCP
Joined: 06 Nov 2013
Total Posts: 727
12 Apr 2015 10:52 AM
I actually tried to make a 5N at freddys cam the one used in the office. but it dont work
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
12 Apr 2015 01:23 PM
b3
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
12 Apr 2015 01:26 PM
It has to be a LocalScript, and it has to be placed into PlayerGui.
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