How to use a tool in Roblox Studio? HELP PLEASE
I Put the tool in the starter pack and I wanted to make the Local script only work when the tool is selected.
The local script I have is for a wave of water. What Do I have to do add a Handle?
02 | Player = script.Parent.Parent |
04 | mouse = Player:GetMouse() |
05 | run = game:GetService( "RunService" ) |
06 | function onKeyDown(key) |
07 | if not enabled then return end |
11 | RightShoulder = Player.Character.Torso [ "Right Shoulder" ] |
12 | LeftShoulder = Player.Character.Torso [ "Left Shoulder" ] |
13 | Run = game:GetService( "RunService" ) |
16 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
17 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
18 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
19 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
20 | Run.Stepped:wait( 0.01 ) |
23 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
24 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
25 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
26 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
27 | Run.Stepped:wait( 0.005 ) |
31 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
32 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
33 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
34 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
35 | Run.Stepped:wait( 0.005 ) |
37 | game:GetService( "Chat" ):Chat(Player.Character.Head, "Water Style: Water Wave Jutsu" ) |
38 | x = Instance.new( "Part" ) |
39 | x.BrickColor = BrickColor.new( "Really Blue" ) |
40 | x.Size = Vector 3. new( 15 , 10 , 2 ) |
41 | x.TopSurface = "Smooth" |
42 | x.BottomSurface = "Smooth" |
47 | fd = script.Waterdamage:clone() |
49 | y = Instance.new( "BodyVelocity" ) |
50 | y.maxForce = Vector 3. new( math.huge , math.huge , math.huge ) |
51 | y.velocity = Player.Character.Torso.CFrame.lookVector* 80 |
54 | f = Instance.new( "Fire" , x) |
57 | x.CFrame = Player.Character.Torso.CFrame*CFrame.new( 0 , 0 , - 6 ) |
59 | game.Debris:AddItem(x, 6 ) |
62 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
63 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
64 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
65 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
66 | Run.Stepped:wait( 0.01 ) |
73 | mouse.KeyDown:connect(onKeyDown) |