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: Laser Pistol doesn't seem to work in online mode... :o

Previous Thread :: Next Thread 
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:03 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:04 AM
[ Content Deleted ]
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
22 Aug 2011 10:04 AM
Localscript much?
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
22 Aug 2011 10:05 AM
h:TakeDamage(h.MaxHealth)
Is way better.
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
22 Aug 2011 10:07 AM
Copied from the Wiki much? =P
Anyways try this:

Put it in a localscript and remove all 'local' variables. That fixed it for me.
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:13 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:31 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:33 AM
[ Content Deleted ]
Report Abuse
DjDaylan is not online. DjDaylan
Joined: 02 Jul 2010
Total Posts: 34
22 Aug 2011 10:35 AM
cuz u cant script
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:37 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:39 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:43 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:44 AM
[ Content Deleted ]
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
22 Aug 2011 10:55 AM
Try this:

Tool = script.Parent
User = nil
Tool.Equipped:connect(function(mouse)
User = Tool.Parent
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function()
if not script.Parent.Shoot.Value and not script.Parent.Reloading.Value then
script.Parent.Shoot.Value = true
Ray = Ray.new(Tool.Handle.CFrame.p, (mouse.Hit.p - Tool.Handle.CFrame.p).unit*300)
Hit, Position = game.Workspace:FindPartOnRay(Ray, User)
if Hit and Hit.Parent:FindFirstChild("Humanoid") then
if Hit.Name == "Head" then
h:TakeDamage(h.MaxHealth)
elseif Hit.Name == "Torso" then
h:TakeDamage(75)
else
h:TakeDamage(25)
end
end
end
RayPart = Instance.new("Part", game.Workspace)
RayPart.Name = "RayPart"
RayPart.BrickColor = BrickColor.new("Bright red")
RayPart.Transparency = 0.5
RayPart.Anchored = true
RayPart.CanCollide = false
RayPart.TopSurface = "Smooth"
RayPart.BottomSurface = "Smooth"
RayPart.formFactor = "Custom"
Distance = (Position-Tool.Handle.CFrame.p).magnitude
RayPart.Size = Vector3.new(0.2,0.2,Distance)
RayPart.CFrame = CFrame.new(Position,Tool.Handle.CFrame.p) * CFrame.new(0,0,-Distance/2)
game.Debris:AddItem(RayPart,0.1)
mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
script.Parent.Clip.Value = script.Parent.Clip.Value - 1
wait(2)
if script.Parent.Clip.Value > 0 then
script.Parent.Shoot.Value = false
end
mouse.Icon = "rbxasset://textures\\GunCursor.png"
end)

~~{I'm a dangerous sociopath with a long history of violence}~~
~{I don't understand how you keep forgetting that}~
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 10:55 AM
[ Content Deleted ]
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
22 Aug 2011 10:56 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 11:08 AM
[ Content Deleted ]
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
22 Aug 2011 11:11 AM
[ Content Deleted ]
Report Abuse
comiconor is not online. comiconor
Joined: 26 May 2009
Total Posts: 16893
22 Aug 2011 11:16 AM
[ Content Deleted ]
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