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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

ChildAdded function, Help?

Previous Thread :: Next Thread 
Jaxxonater is not online. Jaxxonater
Joined: 16 Apr 2013
Total Posts: 54
30 Apr 2016 07:20 AM
So, My issue with this script is in Test servers the script works fine.
Thought in Live servers the script doesn't work at all, I'm not sure what's causing this and need some assistance with it, As it's kind of annoying it works one way, not the other.


local Player = game.Players.LocalPlayer

Player.Character.ChildAdded:connect(function(child)
if child:IsA("Tool") then
wait(0.1)
local MinDmg = child:findFirstChild("MinDmg")
local MaxDmg = child:findFirstChild("MaxDmg")
script.Parent.WepName.Text = child.Name .. "'s " .. " Dmg: " .. MinDmg.Value .. " - " .. MaxDmg.Value
end
end)

Player.Character.ChildRemoved:connect(function(child)
if child:IsA("Tool") then
wait(0.1)
script.Parent.WepName.Text = (" Unequipped ")
end
end)
Report Abuse
bolbolnegm is not online. bolbolnegm
Joined: 10 Aug 2013
Total Posts: 42
30 Apr 2016 07:28 AM
local MinDmg = child:FindFirstChild('MinDmg')
local MaxDmg = child:FindFirstChild('MaxDmg')
Try that
Report Abuse
eRanged is online. eRanged
Joined: 15 Jun 2013
Total Posts: 9746
30 Apr 2016 07:59 AM
local MinDmg = child:WaitForChild("MinDmg")
local MaxDmg = child:WaitForChild("MaxDmg")


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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