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: Works in Solo, not Server - Event not firing

Previous Thread :: Next Thread 
GhostSailor is not online. GhostSailor
Joined: 02 Jul 2010
Total Posts: 1913
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 is not online. 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 is not online. ZombieT2
Joined: 06 May 2012
Total Posts: 6000
20 Mar 2014 11:17 PM
put it in local script?
Report Abuse
LucasLua is not online. 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
GhostSailor is not online. GhostSailor
Joined: 02 Jul 2010
Total Posts: 1913
20 Mar 2014 11:30 PM
Okay. Thanks.
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