Why won't this work
script.Parent.Anchored = true
function onClicked()
script.Parent.Transparency = .5
script.Parent.CanCollide = false
wait(3)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
Offline
goko305 wrote:
Why won't this work
script.Parent.Anchored = true
function onClicked()
script.Parent.Transparency = .5
script.Parent.CanCollide = false
wait(3)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
You need to add a conect line at the end. For that script it would be: script.Parent.ClickDetector.MouseClick:connect(onClicked)
Add that to the end and you should be good.

Offline
goko305 wrote:
Why won't this work
script.Parent.Anchored = true
function onClicked()
script.Parent.Transparency = .5
script.Parent.CanCollide = false
wait(3)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
You forgot the clickdetector.
Offline
function OnClicked()
game:remove()
end
script.Parent.ClickDetector.MouseClick:connect (OnClicked)
Give this to your best friend.
Last edited by Nearmiss (2008-12-30 5:37 PM)
Offline
Thanks but i need something so it will make a certain script happen when someone Dies, Or joins the game because it would be a great help :P
Offline
Man,this help me alot thnx bob.
Offline
I have been trying for months to find a tutorial that actually help me,and this once actually did!Thnx!
Offline
ARGHHHHH.
I can't get through tutorial 2,and even 1 is hard...
F YOU AUTISMf
Offline
Well since this thread is already bumped I might as well ask. How long do you think it will be until lesson 3 is done?
Last edited by zasguach (2009-03-23 10:44 AM)

Offline
Hey Bob, how about adding a tutorial on how something follows a mouse direction.
Like making a vehicle face where the mouse is facing or like a gun pointing at where the cursor is at without doing the "Button1Down " part(clicking).
I'm having troubles with such things relating to "Players" control.
Last edited by smashbi121 (2009-04-21 8:31 PM)
Offline
Hmm, I'll think about doing it sometime this weekend. This week's too busy for me.
In the meantime, look here.
Offline
bob10110 wrote:
Hmm, I'll think about doing it sometime this weekend. This week's too busy for me.
In the meantime, look here.
Yes I read and tried as hard to understand everything about the page but it didn't explain much about this:
Hit -- CFrame value
Target -- object value
X -- mouse's X position on the screen.
Y -- mouse's Y position on the screen.
Offline
Hit -- think of that as where exactly that green disk would show up if you didn't have any tools selected.
Target -- the brick you're attempting to click. It acts quite similarly to a MouseDetector, if you've ever worked with those.
X/Y -- Don't bother yourself too much with these, there's little practical use for them.
Offline
thanks, it's great
Offline
thanx bob...this helped alot
Offline
Heh. I know how to make tool 'Categories'.

Offline
:O The first thing too actually teach me how too script!!!
Offline
KKTHXBOB10110! First scripting tutorial that made sense.
Offline
can you please teach me how give one team one typee of gun and the other team another
Offline
Thanks,bob.
Thanks to your tutorials I was able to make this.
http://www.roblox.com/Item.aspx?ID=11985923
Offline
Its sad how i cant get past the first part,i pulled up the command tool bar,because i couldnt find where to type it i typed "print ("hello world")" and didnt do anything.
its official,i fail at scripting
Offline
Hmm...actually, I should go try that myself. I never did do anything with the print() function in the Command line.
EDIT: Are you sure you have the Output window showing as well? That's the thing that print() uses to display messages.
In the meantime, I should have some pretty decent info up soon -- I'm here often enough that I might as well share a bit more of what I've learned. I'll definitely be mentioning "_G" -- if you're wondering what that is, check my Roblox blurb.
Last edited by bob10110 (2009-06-27 4:22 PM)
Offline
Thanks for making this simple scripting tutorial, anyways can you explain more of the "GetChildren" function.
I'm not sure if that really works on making a "Model" anchored using a script.
Offline
Well, basically getChildren() creates a table of anything that's inside whatever you use the function (really, it's a "method" but I'll call it a function for simplicity). You can then manipulate the objects in this table individually.
Dang, I can never get around to this can I?
Offline