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

Scripting without Tools?

Asked by 8 years ago

I have converted many of my old scripts that relied on tools into one big local script. The only problem is that I have run into a problem where the script NEEDS a location and a part for the move. For example, my Chidori function does work, however it does not raise the right hand up like a tool does and it does not create the Chidori part.

function Chidori()
    s = Instance.new("Sound", SasukeBox.Handle)
s.Volume = 0.2
s.Pitch = 3
s.SoundId = "http://www.roblox.com/asset/?id=2974000"
s:Play()
local b = game.Lighting.RDremover:clone()
b.Parent = s
b.Disabled = false
x = Instance.new("BlockMesh")
x.Parent = SasukeBox.Handle
if SasukeBox.Special.Value == 0 then
game:GetService("Chat"):Chat(p.Character.Head,"Lightning Style: Chidori!")
local Spark1 = Instance.new("Sparkles")
Spark1.SparkleColor = Color3.new(0, 51, 204)
Spark1.Parent = SasukeBox.Handle
local Spark2 = Instance.new("Sparkles")
Spark2.Parent = p.Character["Right Arm"]
Spark2.SparkleColor = Color3.new(0, 51, 204)
elseif SasukeBox.Special.Value == 1 then
game:GetService("Chat"):Chat(p.Character.Head,"Lightning Style: Dark Chidori!")
local Spark1 = Instance.new("Smoke")
Spark1.Size = 0.25
Spark1.Color = Color3.new(0, 0, 0)
Spark1.Opacity = 0.25
Spark1.RiseVelocity = 0.25
Spark1.Parent = p.Character["Right Arm"]
local Spark2 = Instance.new("Smoke")
Spark2.Size = 0.25
Spark2.Color = Color3.new(0, 0, 0)
Spark2.Opacity = 0.25
Spark2.RiseVelocity = 0.25
Spark2.Parent = SasukeBox.Handle
end
x.Scale = Vector3.new(0, 0, 0)
RightShoulder = p.Character.Torso["Right Shoulder"]
LeftShoulder = p.Character.Torso["Left Shoulder"]
for i=1, 9 do
LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,-0.1)
wait()
end
for i=1, 4 do
RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,-0.3)
wait()
end
for i = 1,15 do
RightShoulder.C0 = RightShoulder.C0*CFrame.Angles(0,0.05,0)
LeftShoulder.C0 = LeftShoulder.C0*CFrame.Angles(0.1,0,0)
wait()
end
if SasukeBox.Special.Value == 0 then
for i = 1,20 do
x.Scale = x.Scale +Vector3.new(0.025, 0.025, 0.05)
wait(0.025)
end
elseif SasukeBox.Special.Value == 1 then
for i = 1,20 do
x.Scale = x.Scale -Vector3.new(0.025, 0.025, 0.05)
wait(0.025)
end
end
for i = 1,15 do
RightShoulder.C0 = RightShoulder.C0*CFrame.Angles(0,-0.05,0)
LeftShoulder.C0 = LeftShoulder.C0*CFrame.Angles(-0.1, 0,0)
wait()
end
for i=1, 4 do
RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0,0.3)
wait()
end
for i=1, 9 do
LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0,0.1)
wait()
end


p.Character.Humanoid.WalkSpeed = 70
for i = 1,30 do
wait(0.1)
end
p.Character.Humanoid.WalkSpeed = 16
if x ~= nil then
x:remove()
end
end

Please help out and thank you for reading.

0
this looks a little sloppy >.>. Indents are very helpful for organizing your code koolkid8099 705 — 8y

Answer this question