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: My tool is not working correctly in Online mode.

Previous Thread :: Next Thread 
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 07:26 PM
It works 100% PERFECT in studio, but when I'm in Online, only the Unequipped event works..

Ask me any questions I would be happy to help because I have no idea what the problem is...


repeat wait(.1) until game.Players.LocalPlayer.Character
maindamage = script.Damage.Value
editdamage = maindamage
player = game.Players.LocalPlayer
character = player.Character
torso = character.Torso
rightArmWeld = torso["Right Shoulder"]
leftArmWeld = torso["Left Shoulder"]
tool = script.Parent
handle = tool.Handle
fighting = true
stancenum = 0
tool.Unequipped:connect(function(mouse)
rightArmWeld.C1 = rightArmWeld.C1 * CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))
end)
tool.Equipped:connect(function(mouse)
repeat wait() until character["Right Arm"].RightGrip
toolWeld = character["Right Arm"].RightGrip
handle.Touched:connect(function(part)
if part.Parent:FindFirstChild("Humanoid") and part.Parent ~= character then
part.Parent:FindFirstChild("Humanoid"):TakeDamage(editdamage)
end
end)
rightArmWeld.C1 = rightArmWeld.C1 * CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90))
mouse.Button1Down:connect(function()
if fighting then
stancenum = stancenum + 1
if stancenum >= 2 then
fighting = false
toolWeld.C1 = toolWeld.C1 * CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0))
rightArmWeld.C1 = rightArmWeld.C1 * CFrame.Angles(math.rad(0),math.rad(0),math.rad(-45))
toolWeld.C1 = toolWeld.C1 * CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))
editdamage = maindamage + maindamage/10
wait(.5)
editdamage = maindamage - maindamage/10
toolWeld.C1 = toolWeld.C1 * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
fighting = true
else
rightArmWeld.C1 = rightArmWeld.C1 * CFrame.Angles(math.rad(0),math.rad(0),math.rad(45))
toolWeld.C1 = toolWeld.C1 * CFrame.Angles(math.rad(20),math.rad(0),math.rad(0))
wait(.2)
if stancenum < 2 then
toolWeld.C1 = toolWeld.C1 * CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0))
rightArmWeld.C1 = rightArmWeld.C1 * CFrame.Angles(math.rad(0),math.rad(0),math.rad(-45))
end
end
end
stancenum = 0
end)
end)
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
19 Apr 2014 07:30 PM
SomeStuffOnLyWorksInOfflineModeNoob!
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 07:32 PM
You don't have to call me a "noob" I already know some things don't work in Online mode, I just want to know whats wrong with this script...
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 07:42 PM
Let me post it without any of the script parts..
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 07:44 PM
Dumbed down version..


repeat wait(.1) until game.Players.LocalPlayer.Character
player = game.Players.LocalPlayer
character = player.Character
torso = character.Torso
rightArmWeld = torso["Right Shoulder"]
leftArmWeld = torso["Left Shoulder"]
tool = script.Parent
handle = tool.Handle
tool.Unequipped:connect(function(mouse)

end)
tool.Equipped:connect(function(mouse)
repeat wait() until character["Right Arm"].RightGrip
toolWeld = character["Right Arm"].RightGrip
handle.Touched:connect(function(part)
if part.Parent:FindFirstChild("Humanoid") and part.Parent ~= character then
end
end)
mouse.Button1Down:connect(function()
if fighting then
if stancenum >= 2 then

else

if stancenum < 2 then

end
end
end

end)
end)
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 08:09 PM
...
Report Abuse
monsterMrMcMan is not online. monsterMrMcMan
Joined: 20 Jun 2010
Total Posts: 463
19 Apr 2014 08:11 PM
I'm not good at lua but C++ I'm great so um... yeah
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 08:11 PM
Than why don't you do something with your life and build things on Unity instead of wasting it here...
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
19 Apr 2014 08:12 PM
McChickenIsANoob

Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 08:33 PM
..?
Report Abuse
jacob726 is not online. jacob726
Joined: 24 Jul 2008
Total Posts: 10732
19 Apr 2014 08:38 PM
Tools -> Start Server
Tools -> Start Player

Open output; look for error messages if any.

~>http://www.youtube.com/watch?v=jTQXOHkvUS4<~
Report Abuse
jacob726 is not online. jacob726
Joined: 24 Jul 2008
Total Posts: 10732
19 Apr 2014 08:39 PM
Tools->Test->other stuff, that is.

~>http://www.youtube.com/watch?v=jTQXOHkvUS4<~
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 08:39 PM
Forgot about servers..
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
19 Apr 2014 09:02 PM
thanks for the compliment noob.
whats that you hate me? love ya too!

I got pecked by TWO chicken's!
Report Abuse
TheProgrammingMaster is not online. TheProgrammingMaster
Joined: 20 Aug 2011
Total Posts: 7602
19 Apr 2014 09:15 PM
Anyway Fixed.
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