The tanks in my game have the default turret controls which is WASD, I want to change it so that its IJKL so that I can combine the scripts into one seat so that 1 person can control the whole tank himself. Below is the code in the script called "Control2"...
repeat wait() until script.Parent.Parent.Vehicle.Value~=nil db=false held=false v=script.Parent.Parent.Vehicle f=script.Parent missile=script.Parent.HE function fireguns() v1=v.Value.Gun1Bullet:clone() vel=Instance.new("BodyVelocity") vel.Parent=v1 v1.Velocity=v1.CFrame.lookVector*500 vel.velocity=v1.Velocity v1.CanCollide=true v1.Transparency=0 v1.Damage.Disabled=false v1.Parent=workspace end function launchmissile() v.Value.Effect.PointLight.Enabled = true v.Value.Effect.Smoke.Enabled = true v.Value.Effect.Fire:Play() v.Value.Effect.Transparency = .5 v.Value.WER2.Value.C0 = v.Value.WER2.Value.C0 - Vector3.new(0,0, .5) v1=v.Value.Missile:clone() v1.CFrame = v.Value.Missile.CFrame * CFrame.new(0, 0, -5) vel=Instance.new("BodyVelocity") vel.Parent=v1 v1.Velocity=v1.CFrame.lookVector*500 vel.velocity=v1.Velocity v1.CanCollide=true v1.Transparency= 0 v1.Heat.Disabled=false v1.Parent=workspace wait(.1) v.Value.WER2.Value.C0 = v.Value.WER2.Value.C0 + Vector3.new(0,0, .1) v.Value.Effect.Transparency = .6 wait(.1) v.Value.WER2.Value.C0 = v.Value.WER2.Value.C0 + Vector3.new(0,0, .1) v.Value.Effect.Transparency = .7 wait(.1) v.Value.WER2.Value.C0 = v.Value.WER2.Value.C0 + Vector3.new(0,0, .1) v.Value.Effect.Transparency = .8 wait(.1) v.Value.WER2.Value.C0 = v.Value.WER2.Value.C0 + Vector3.new(0,0, .1) v.Value.Effect.Transparency = .9 wait(.1) v.Value.WER2.Value.C0 = v.Value.WER2.Value.C0 + Vector3.new(0,0, .1) v.Value.Effect.Transparency = 1 V.Value.Effect.Smoke.Enabled = false v.Value.Effect.Smoke.Enabled = false wait(3) end function missileclick() print("click missile") if db==true then return end db=true missile.Text="Reloading" launchmissile() v.Value.Effect.Reload:Play() wait(7) missile.Text="Fire HE" v.Value.Effect.Reload:Stop() db=false end function gunsdown() held=true while held==true do fireguns() wait() end end function gunsup() held=false print("up") end missile.MouseButton1Click:connect(missileclick) sabot.MouseButton1Click:connect(sabotclick) guns.MouseButton1Down:connect(gunsdown) guns.MouseButton1Up:connect(gunsup)