Code you need:
3 | script.Parent.Touched:Connect(OnTouch) |
Example of use (my fire script):
03 | local head = hit.Parent:FindFirstChild( "Head" ) |
04 | local human = hit.Parent:FindFirstChild( "Humanoid" ) |
06 | local GC = hit.Parent:GetChildren() |
07 | for i, v in pairs (GC) do |
08 | if v:IsA( "BasePart" ) then |
09 | if v:FindFirstChild( "FireEmmiter" ) = = nil then |
10 | local Particle = script.Parent:FindFirstChild( "FireEmmiter" ) |
11 | local ParticleClone = Particle:Clone() |
12 | ParticleClone.Parent = v |
18 | human.Health = human.Health - 1 |
19 | if human.Health = = 0 then |
20 | local s = hit.Parent:FindFirstChild( "Shirt" ) |
21 | local p = hit.Parent:FindFirstChild( "Pants" ) |
22 | for i, v in pairs (GC) do |
23 | if v:IsA( "Accessory" ) then |
25 | else if v:IsA( "BasePart" ) then |
26 | v.Material = Enum.Material.Slate |
27 | v.Color = Color 3. fromRGB( 27 , 42 , 53 ) |
45 | script.Parent.Touched:Connect(OnTouch) |
Closed as Not Constructive by itz_rennox, Torren_Mr, User#29913, zblox164, and JesseSong
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?