|
| 22 Jul 2017 06:07 AM |
| https://forum.roblox.com/Forum/ShowPost.aspx?PostID=221288582 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 22 Jul 2017 12:43 PM |
Here's an example of a bad script:
local thing = workspace.Thing thing.Property = something
This script would error if 'Thing' isn't a thing.
Here's an example of using :FindFirstChild(), redundantly:
local thing = workspace:FindFirstChild('Thing') thing.Property = something
Once again, the script would error if 'Thing' isn't a thing,
Here's an example of using :FindFirstChild(), correctly:
local thing = workspace:FindFirstChild('Thing') if thing then thing.Property = something end
No error.
WaitForChild() also works, unless it's something that might not be there.
Let's say you're working with some type of Humanoid figure, if you use :WaitForChild() to wait for one of the Arms, you may be waiting indefinitely, because the arm might have fallen off.
That would be an example of when to use :FindFirstChild() over :WaitForChild()
I didn't read the whole thing you typed up because I'm lazy, but I'll let you figure out if you should use FFC or WFC
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2017 08:49 PM |
| i cant get a new firepart to have the same properties as the original. the new firepart is the one that was made by touching the original firepart. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2017 01:53 AM |
| the firesafe unflammable script wont work either |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Iegoadz
|
  |
| Joined: 13 Sep 2015 |
| Total Posts: 4189 |
|
|
| 23 Jul 2017 06:45 AM |
test the game using a test server in studio and check whether when the script is running you can find this 'firepart' to see if your script is wrong or whether this part never existed in the first place.
'No method name passed in __namecall for Object' - not sure what's gone on here
'repeat game.workspace.unflammable:connect (PutOutFire) until false
connect is not a valid member of Part'
Pretty sure 'connect' should have a capital C, but it could just be that you can't call ':Connect()' on the part, you should check the wiki
|
|
|
| Report Abuse |
|
|
Iegoadz
|
  |
| Joined: 13 Sep 2015 |
| Total Posts: 4189 |
|
|
| 23 Jul 2017 06:50 AM |
nvm u can use lowercase c, idk what is up with all your scripts
|
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 23 Jul 2017 12:48 PM |
"46:repeat 47:unflammable=game.workspace.unflammable 48:FireSafe= Instance.new PutOutFireSafe() 49if unflammable then 50:FireSafe.parent = unflammable() 51:end 52:until false"
Ok you really need to start here: http://wiki.roblox.com/index.php?title=Intro_to_Scripting
What is line 48 even doing? What is line 50 doing? How are you going to act like an object is a function?
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|