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
 

Not working when I take out the tool..

Previous Thread :: Next Thread 
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 02:54 PM
Tool = script.Parent
GUI = script.CodeGUI
local Character = Tool.Parent
local Plr = game.Players:GetPlayerFromCharacter(Character)

Tool.Equipped:connect(function(mouse)
if Character then
if Plr then
if not Plr.PlayerGui:findFirstChild("CodeGUI") then
GUI:clone().Parent = Plr.PlayerGui
Plr.PlayerGui.CodeGUI.Frame:TweenPosition(UDim2.new(0,0,0.300000012,0),"Out","Quad",.25)
end
end
end
end)

Tool.Unequipped:connect(function(mouse)
if Character then
if Plr then
if GUI then
a = Plr.PlayerGui:findFirstChild("CodeGUI")
end
if a then
a.Name = "G"
a.Frame:TweenPosition(UDim2.new(-0.4,0,0,0),"Out","Quad",.25)
wait(1)
a:Remove()
end
end
end
end)
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 03:05 PM
Bump
Report Abuse
Wakarimasu is not online. Wakarimasu
Joined: 12 Nov 2013
Total Posts: 1448
01 Jan 2014 03:17 PM
Is it a local script?
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 03:24 PM
Yes.
Report Abuse
Wakarimasu is not online. Wakarimasu
Joined: 12 Nov 2013
Total Posts: 1448
01 Jan 2014 03:27 PM
What part is not working?

Is it not getting the mouse? If not, you might have to go the long route and use GetPlayerFromCharacter() and GetMouse()
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 03:28 PM
Oops. "mouse" is accidently in there. Does it make a difference though?
Report Abuse
Wakarimasu is not online. Wakarimasu
Joined: 12 Nov 2013
Total Posts: 1448
01 Jan 2014 03:29 PM
Yeah. Don't quote me on this, but I think only hopperbins can get a mouse from Selected(), not tools. But I'm not 100% sure.
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 04:02 PM
I remove the "mouse", but it still doesn't work.
Report Abuse
Wakarimasu is not online. Wakarimasu
Joined: 12 Nov 2013
Total Posts: 1448
01 Jan 2014 04:04 PM
Did you use GetPlayerFromCharacter() and GetMouse()?

Post your new code.
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 05:49 PM
well, I already used the GPFC, but why would I use GetMouse?

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 06:33 PM
Bump

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
Report Abuse
Wakarimasu is not online. Wakarimasu
Joined: 12 Nov 2013
Total Posts: 1448
01 Jan 2014 06:48 PM
mouse = player:GetMouse()

That makes it so you're able to use the mouse, and it sets it as a variable.
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 06:59 PM
Ok. Tell me where'd I put that?

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 07:20 PM
B2

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 07:50 PM
B3

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
01 Jan 2014 07:52 PM
so you can't look up how to use :GetMouse() and you're incorrectly correcting people's scripts?

please sir, get out
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
01 Jan 2014 07:52 PM
and why are you even defining Mouse it's not necessary
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 07:53 PM
I removed mouse and it still didn't work.

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
Report Abuse
shawnyg is not online. shawnyg
Joined: 21 Apr 2011
Total Posts: 1428
01 Jan 2014 09:42 PM
Could someone further explain what's wrong?

~Hope I helped, if you need a script, PM me first then buy this when I tell you to: http://www.roblox.com/My-Script-Shirt-item?id=118961994~~CAT ★★★★ General Shawnyg~
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