|
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 26 Mar 2014 08:12 PM |
| mousebutton2 works as long as you use function(bunghole) |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
| |
|
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 |
|
|
|
| 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 |
|
|
| |
|
| |
|
|
| 26 Mar 2014 08:52 PM |
| Oh plz i was happy with my tool u_u |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2014 08:54 PM |
"script.Parent.ClickDetector.MouseButton1Down:connect(damageOTHER)"
WRONG
ClickDetector.MouseClick |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 27 Mar 2014 08:44 AM |
| I think its onActived then. How do i write that? |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|