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

How do I make this do damage when an enemy touches the part named "SandPool"?

Asked by 8 years ago

--Title says it all

01Player = script.Parent.Parent
02Char = Player.Character
03mouse = Player:GetMouse()
04 
05 
06function keydown(key)  
07    key:lower()
08    if key == "v" then
09        SandPool = Instance.new("Part")
10        SandPool.Parent = Char["Torso"]
11        SandPool.CFrame = CFrame.new(Char["Right Leg"].Position)
12        SandPool.Size = Vector3.new(1,.2,1)
13        SandPool.BrickColor = BrickColor.new("Daisy orange")
14        SandPool.Name = "SP"
15        SandPlate = Instance.new("CylinderMesh")
View all 38 lines...

1 answer

Log in to vote
0
Answered by
sammiya1 134
8 years ago
01-- I put this stuff here to show just where the Sound is located
02wait(34)
03Song = game.Workspace.PickAToonSongs
04Song.Volume = 1
05Song.Looped = true
06 
07 
08Assets = {253943659,392883743}
09for _, asset in ipairs(Assets) do
10game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=" .. asset)
11end
12 
13 
14Song.SoundId = "rbxassetid://" ..Assets[math.random(1,#Assets)] --'http://www.roblox.com/asset/?id=' can also be used.
15Song:Play()
Ad

Answer this question