|
| 20 Mar 2014 10:38 PM |
I have a script that is used in a tool to animate it, and open a gui.
I'm using mouse.Button1Down as the activator, and it works in play solo. The second I go in to server mode, or online, it stops working. Button1Down isn't called. The same goes for Tool.Activated.
No errors, it just isn't called. Any ideas?
local Tool = script.Parent local Humanoid local Stop = false local animTrack
Tool.Equipped:connect(function(mouse) print("Equipped") print(mouse) mouse.Button1Down:connect(function() print("Activate") --Tool.Activated:connect(function() if not mouse then game.Players:GetPlayerFromCharacter(script.Parent.Parent).PlayerGui.ScreenGui.TextLabel.Text = "nomouse" return end if not mouse.Target then game.Players:GetPlayerFromCharacter(script.Parent.Parent).PlayerGui.ScreenGui.TextLabel.Text = "noTarget" return end if not mouse.Target:IsA("BasePart") then game.Players:GetPlayerFromCharacter(script.Parent.Parent).PlayerGui.ScreenGui.TextLabel.Text ="NotBase" return end if not mouse.Target.Name == "HackMe" then game.Players:GetPlayerFromCharacter(script.Parent.Parent).PlayerGui.ScreenGui.TextLabel.Text = "NotHackMe" return end if not mouse.Target.Parent.Parent:findFirstChild("Hacked") then game.Players:GetPlayerFromCharacter(script.Parent.Parent).PlayerGui.ScreenGui.TextLabel.Text = "True" return end local magnitude = (mouse.Target.Position - script.Parent.Parent.Head.Position).magnitude if magnitude >= 7 then return end if mouse.Target.Parent.Parent:findFirstChild("Hacked").Value == true then return end game.Players:GetPlayerFromCharacter(script.Parent.Parent).PlayerGui.ScreenGui.TextLabel.Text = "Go" local hk = game:GetService("ServerStorage").HackGUI:Clone() --local hk = game.ServerStorage.HackGUI:Clone() hk.Parent = game.Players:GetPlayerFromCharacter(script.Parent.Parent).PlayerGui hk.MainFrame.ValueToChange.Value = mouse.Target.Parent.Parent:findFirstChild("Hacked") --mouse.Target.Parent.Parent:findFirstChild("Hacked").Value = true end) end)
--http://www.roblox.com/Hacking-Animation-item?id=150206097 --d0dd3386970abd2ee7b29f0a404f951a |
|
|
| Report Abuse |
|
|
Gogeta
|
  |
| Joined: 25 Nov 2006 |
| Total Posts: 583 |
|
|
| 20 Mar 2014 11:12 PM |
| I had a similar problem, and in the end it was another script interfearing with the one i was using. |
|
|
| Report Abuse |
|
|
ZombieT2
|
  |
| Joined: 06 May 2012 |
| Total Posts: 6000 |
|
| |
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 20 Mar 2014 11:23 PM |
| Mouse stuff like that only works with a local script, which explains why it works in Test Solo. |
|
|
| Report Abuse |
|
|
| |
|