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: Does Button2Down still working?

Previous Thread :: Next Thread 
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
26 Mar 2014 07:57 PM
I have made a tool that does a function when you touched anywhere. It worked at the studio, but it doesnt work at online. It happens at places like a pirates life (i know interact tool is fixed), epic mining... These things broke because of roblox updates and maybe the button2down doesnt work anymore...
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
26 Mar 2014 08:00 PM
yes it should work
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
26 Mar 2014 08:02 PM
Button2Down?
I hope you mean MouseButton2Down
Otherwise, this will NEVER work.
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
26 Mar 2014 08:02 PM
local t = script.Parent
f=true
t.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
plr = game.Players:GetPlayerFromCharacter(t.Parent)
m = (plr.Character.Head.Position - mouse.Hit.p).Magnitude
if m<=300 and f==true then

This is a piece of my script. It works at the roblox studio but it doesnt when i play online. What should i change?
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
26 Mar 2014 08:03 PM
No
mouse.MouseButton1Down
I don't know what your doing, that method is unknown to me..
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
26 Mar 2014 08:10 PM
MouseButton1Down is not a valid member of Mouse

I saw this at the output and the tool doesnt work...
Report Abuse
MECHANIZATION is not online. MECHANIZATION
Joined: 03 Jul 2013
Total Posts: 104
26 Mar 2014 08:12 PM
mousebutton2 works as long as you use function(bunghole)
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
26 Mar 2014 08:13 PM
God, function bunghole doesn't work for everything, does it?
No,
It doesn't.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
26 Mar 2014 08:19 PM
That's what I thought.
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
26 Mar 2014 08:20 PM
ok so what i do?
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
26 Mar 2014 08:22 PM
well, if this is for a click, then
script.Parent.ClickDetector.MouseButton1Down:connect(damageOTHER)
-- damage other is the thing where it does what you want it to do,
a function.
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
26 Mar 2014 08:29 PM
This doesnt work neither :(

Ill send a message to lando64000 asking how did he fixed the interact tool :I
Report Abuse
MECHANIZATION is not online. MECHANIZATION
Joined: 03 Jul 2013
Total Posts: 104
26 Mar 2014 08:30 PM
just use bunghole
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
26 Mar 2014 08:32 PM
BUNGHOLE-DOES-NOT-EXIST
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
26 Mar 2014 08:52 PM
Oh plz i was happy with my tool u_u
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
26 Mar 2014 08:54 PM
"script.Parent.ClickDetector.MouseButton1Down:connect(damageOTHER)"

WRONG

ClickDetector.MouseClick
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
27 Mar 2014 05:01 AM
something like this?

local t = script.Parent
f=true
t.Equipped:connect(function(mouse)
ClickDetector.MouseClick:connect(function()
plr = game.Players:GetPlayerFromCharacter(t.Parent)
m = (plr.Character.Head.Position - mouse.Hit.p).Magnitude
if m<=300 and f==true then


It doesnt work
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
27 Mar 2014 05:14 AM
local t = script.Parent
f=true
t.Equipped:connect(function(mouse)
mouse.Button2Down:connect(function()
plr = game.Players:GetPlayerFromCharacter(t.Parent)
if plr then
m = (plr.Character.Head.Position - mouse.Hit.p).Magnitude
if m<=300 and f then
print("Difference is ",m,"magnitude")
end
end
end)
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
27 Mar 2014 05:34 AM
Still not working. Ill better yshow you all my script

local t = script.Parent
f=true
t.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
plr = game.Players:GetPlayerFromCharacter(t.Parent)
if plr then
m = (plr.Character.Head.Position - mouse.Hit.p).Magnitude
if m<=300 and f==true then
f = false
script.Parent:findFirstChild("Fire"):Play()
p = Instance.new("Part",game.Workspace)
p.Position = mouse.Hit.p
p.BrickColor = BrickColor.new(21)
p.Size = Vector3.new(1,1,1)
p.Anchored = true
p.Name = "Pointer"
p.CanCollide = false
c = Instance.new("CylinderMesh")
c.Parent = p
c2 = script.Parent.Laser:Clone()
c2.Parent = p
c2.Disabled = false
c3 = script.Parent.Remover:Clone()
c3.Parent = p
c4 = script.Parent.Rocket:Clone()
c4.Parent = p
c4.Disabled = false
c5 = script.Parent.Killer:Clone()
c5.Parent = p
c6 = script.Parent:findFirstChild("FireSound"):Clone()
c6.Parent = p
script.Parent.E:findFirstChild("Mesh").Scale = Vector3.new(1.3,1.1,1.1)
script.Parent.E.Transparency = 0
wait(0.1)
script.Parent.E:findFirstChild("Mesh").Scale = Vector3.new(1.4,1.2,1.2)
script.Parent.E.Transparency = 0.2
wait(0.1)
script.Parent.E:findFirstChild("Mesh").Scale = Vector3.new(1.5,1.3,1.3)
script.Parent.E.Transparency = 0.4
wait(0.1)
script.Parent.E:findFirstChild("Mesh").Scale = Vector3.new(1.6,1.4,1.4)
script.Parent.E.Transparency = 0.6
wait(0.1)
script.Parent.E:findFirstChild("Mesh").Scale = Vector3.new(1.7,1.5,1.5)
script.Parent.E.Transparency = 0.8
wait(0.1)
script.Parent.E:findFirstChild("Mesh").Scale = Vector3.new(1.2,1,1)
script.Parent.E.Transparency = 1
wait(2)
f=true
end
end
end)

end)
Report Abuse
Jonibus is not online. Jonibus
Joined: 30 Jan 2010
Total Posts: 8985
27 Mar 2014 05:46 AM
MouseButton1Down is only used for GUIs.
http://wiki.roblox.com/index.php/MouseButton1Down_(Event)

Follow me on twitter: @Jonibus_RBX
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
27 Mar 2014 08:44 AM
I think its onActived then. How do i write that?
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
27 Mar 2014 09:14 AM
I need help D:
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Mar 2014 09:30 AM
MouseButton2Down is for GUI objects
Button2Down is for the mouse object
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
27 Mar 2014 09:35 AM
Then i should use onActivated, but how?

For example:

local t=script.Parent

t.Equipped:connect(function(mouse)
mouse.MouseButton1Down:connect(function()
script.Parent:Remove()
end)
end)

I want to change button2down for onActivated.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Mar 2014 09:37 AM
It's mouse.Button1Down, not mouse.MouseButton1Down
And onActivated is just equipping and clicking, which you already did
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