How do I make it so that if I throw a ball at a wall it changes color. Or any object. Something that's a sort of projectile. T'would really appreciate it!
If you throw it just use touched event. When the ball touches the wall code in a line that changes the wall color. You can use a any color or random color.
Dont know if it works, new to scripting, but try it. Hope it works.
In case of a part:
_G.part = script.Parent.Part1 _G.part2 = script.Parent.Part2 part.Touched:Connect(function() if part2:FindFirstChild("Part1") then part.BrickColor = Color3.new(255,0,0) -- Turns part red part2.BrickColor = Color3.new(0,255,0) -- Turns part2 green end end)
In case of a projectile or tool handle:
_G.handle = game.StarterPack.Tool.Handle script.Parent.Touched:Connect(function() if script.Parent:FindFirstChild("Handle") then handle.BrickColor = Color3.new(0,0,203) -- A lovely shade of blue end end)
Color3 always works. You can use BrickColor.new() if you don't understand color values, but I recommend Color3 as you can get names of colors not initially available.