John1626Join Date: 2008-01-01 Post Count: 420 |
My anchor script won't work for some reason. I have checked it over and not sure what wont work. I have tried testing it with the Output and nothings wrong but when I put a "print("blahblahblah")" it wont show up in the output.
function onTouched(hit)
check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
game.Workspace.Boulder.Anchored = false
end
end
script.Parent.Touched:connect(onTouched) |
|
FlameFaceJoin Date: 2007-09-20 Post Count: 1406 |
I use this for an unanchor script, just put it in the bricks you want to fall, and change the wait time for how you prefer.
local Z = script.Parent
function onTouched(hit)
wait(1)
Z.Anchored = false
end
script.Parent.Touched:connect(onTouched) |
|
John1626Join Date: 2008-01-01 Post Count: 420 |
Not what I need. I don't need script.Parent I need game.Workspace. Oh, and there was NO point in making that variable because it just causes more typing. The longer the script doesn't me the more impressive. Besides, I want it to find the Humanoid, so don't change the script COMPLETELY. |
|
erikrulesJoin Date: 2008-02-02 Post Count: 1554 |
well i think i know why it didnt show up in output. if u did output with the script in Solo mode, it wont work u have to go to Roblox Studio and click Play then it work! :D |
|
John1626Join Date: 2008-01-01 Post Count: 420 |
Thats what I did. It just won't work. Can you see anything at all wrong with it? |
|
John1626Join Date: 2008-01-01 Post Count: 420 |
Noone? |
|
Django136Join Date: 2007-07-27 Post Count: 874 |
Well, all I can say is make sure that you've got the 'Boulder" in the right location |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
FindFirstChild("Humanoid")
should be
:findFirstChild("Humanoid")
capitolisation |
|
Dr01d3k4Join Date: 2007-10-11 Post Count: 17916 |
If it still doesn't work, use output, if it still doesn't work, put in "print("")" functions so you can tell if it is even doing anything. |
|
|
Joe its Spelled Capitilazation |
|
FlashJoeWTop 100 PosterJoin Date: 2007-12-24 Post Count: 4886 |
are you sure? oh right, just googled it lol, sorry |
|
John1626Join Date: 2008-01-01 Post Count: 420 |
Droid, I have done the "print" thing for every line and not one came up. Im not even sure if the stupid output is working right. And Joe, its always worked fine for me in my other onTouched scripts. |
|
WirodeuTop 100 PosterJoin Date: 2008-01-04 Post Count: 10853 |
Does your boulder even have a humanoid in it? |
|