|
| 24 Dec 2011 02:19 PM |
function onTouch(Flame) local Flame = game.Workspace:FindFirstChild("Flame") if (game.Workspace.Power.Green.Sparkles = true) then Flame.Fire = true end end
script.Parent.Touched:connect(onTouch) -----------------------------------------------------------------------------------------
What I'm trying to do is take a barrel(Flame) and make the Fire (Fire) inside become true if it's touching the part containing the script in a model(Power).
It wont turn on unless the sparks (Sparkles) inside of the model in another part (Green) is true.
Basicly it's just starting a fire with sparks... :) I ned help really bad withthis script, it's for Penumbra... :( |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:23 PM |
| well, it depends, if someone touches it do you want them die, or just as a decoration. |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:26 PM |
You don't touch anything, you activate the sparks with a button, and the sparks turn off after a few seconds so thats why I'm doing this.
Its kind o a puzzle...
Anyway's Idon't know how to make a script work if a brick is touching another brick... |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:41 PM |
| Please help me! This script has been a problem for atleast a month, I'm sick of it... |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:43 PM |
Lol the reason why it's not working cause the function is not connected and it only runs once.
~= Pointless siggy. Ujelly? =~ |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:45 PM |
| So what add "while true do"? I didn't quite get what you were saying... |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 02:59 PM |
function onTouched(hit)
end
Also when do you want it to see if spark is true?
script.Parent.Touched:connect(onTouched)
~= Pointless siggy. Ujelly? =~ |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 03:04 PM |
| After you clicked the button in another model, which turns sparks on. |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 03:06 PM |
http://wiki.roblox.com/index.php/Making_an_onClicked_script
~= Pointless siggy. Ujelly? =~ |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 03:11 PM |
| So what? Use method 1? That doesn't exactly help much... |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 03:12 PM |
function onClicked() --Do stuff end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Make sure this script is inside of a click detector.
~= Pointless siggy. Ujelly? =~ |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 03:26 PM |
Hey buddy, I already know hat script, it's one of the first things I learned. I don't need to know what thank you.
...Do you even understand most of the script?!
Well I'm going to try another method I guess...
function onHit(hit) if game.Workspace:FindFirstChild("Flame") ~= nil then game.Workspace.Flame:remove()
Or something... also yes, I do know the last line, I just don't wanna type it in the forums since it's in the script already... |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2011 03:45 PM |
YOur missing a end and a connect line.
~= Pointless siggy. Ujelly? =~ |
|
|
| Report Abuse |
|
|