Basically, this script copy and pastes a script named SAH in Server Script Service into every part of Hodel named taw.
local servScriServ = game:GetService("ServerScriptService")
for i,v in pairs(game.Workspace.Hodel:GetChildren()) do
if v.Name == "taw" then
local newScript = servScriServ.SAH:Clone() --make sure this refers to the script itself
newScript.Parent = v
end
end
This is the SAH script (which is also in a part in Hodel named Part)
local debounce = true
local Sound = script.Parent.Parent.Parent.taw.Sound
local Light = script.Parent.Parent.Parent.taw.Light
local Particle1 = script.Parent.Parent.Parent.taw.Particle1
local Particle2 = script.Parent.Parent.Parent.taw.Particle2
script.Parent.MouseClick:Connect(function()
if debounce == true then
debounce = false
local time1 = math.random (1,1) --IMPORTANT: This is how long between each shot
local time2 = math.random(1,1) --This just picks when in that second it'll happen.
wait (time1+time2/100)
Sound:Play()
Light.Enabled = true
Particle1.Enabled = true
Particle2.Enabled = true
for number = 1,10,1 do
script.Parent.Parent.Parent.taw["ParticleEmitter" .. number].Enabled = true
end
wait(0.1)
Light.Enabled = false
Particle1.Enabled = false
Particle2.Enabled = false
for number = 1,10,1 do
script.Parent.Parent.Parent.taw["ParticleEmitter" .. number].Enabled = false
end
debounce = true
end
end)
What i think i should do is to make the SAH script in "Part" activate the other SAH script's only when its clicked, the thing is I have no idea how to make a mouse click script activate a script. Does anybody know how i could make that happen? Thank you if you help.

1 comment
You can combine them together, dont need to make them different script (you could try this good luck)