Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How do i make a brick when clicked a fire lights up?

Asked by 10 years ago

Its just when you click the brick it needs to start a fire then activate a dynamic lighting light.

2 answers

Log in to vote
1
Answered by
DevWork 80
10 years ago

I had an error with the script above. Place this inside a script which should be a child of the ClickDetector.

script.Parent.MouseClick:connect(function()
f = Instance.new("Fire")
l = Instance.new("PointLight")
f.Parent = script.Parent.Parent
l.Parent = script.Parent.Parent
end)
Ad
Log in to vote
-1
Answered by
IcyEvil 260 Moderation Voter
10 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

something like this

game.Workspace.Changethistothingyouwantclicked.OnClicked:connect(function()
c = Instance.new("ClickDetector")
f = Instance.new("Fire")
c.Parent = script.Parent
f.Parent = script.Parent
if f.Parent = script.Parent then
game.Lighting.GlobalShadows = true
end
end
end)

Answer this question