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
 

Simple mouse changing script

Previous Thread :: Next Thread 
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
15 Sep 2012 11:21 PM
LocalScript inside of StarterGui:

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

mouse.KeyDown:connect(function(key)
if key == "m" then
mouse.Icon = "http://www.roblox.com/asset/?id=90926941"
end
end)

Pretty basic.

Supposed to change the mouse icon when the m key is pressed

Output:

Cannot set Icon of a PlayerMouse
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
15 Sep 2012 11:23 PM
bamp
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
15 Sep 2012 11:23 PM
Not possible yet.
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
15 Sep 2012 11:24 PM
Changing the mouse icon? I figured that xD
Report Abuse
WhoBloxedWho is online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
15 Sep 2012 11:25 PM
It's possible, just not the way your doing it.

At the moment, you need to use a Tool or HopperBin to get the mouse. The functions work the same just in a tool form.

In future updates the GetMouse() method should work, but until then it's tool bound.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
15 Sep 2012 11:26 PM
Yeah, Bloxedwho is right. You need to equip the tool, run the KeyDown event then check it.
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
15 Sep 2012 11:26 PM
GetMouse() isn't the best so far.
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
15 Sep 2012 11:30 PM
Thanks :D

You guys know if it can change the text of a GUI?
Report Abuse
TheLuaTester is not online. TheLuaTester
Joined: 24 May 2012
Total Posts: 168
15 Sep 2012 11:31 PM
I believe it will, but only a local gui.

if CookieMonster.pro == true
then do
repeat wait()
KirbyDance
until CookieMonster.pro = false --In other words, KirbyDance forever!
end

-Tester-
Report Abuse
WhoBloxedWho is online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
19 Sep 2012 02:01 PM
Yea Gui text can be changed.

Any TextButton/TextLabel/TextBox has a .Text property which can be changed.

ToxtBox allows for user input on the Gui, so it' wise not to use it for displaying information.
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