|
| 08 Aug 2013 05:21 PM |
This works perfectly in Studio, but not Play mode. It worked before, but then I added this:
wait() ls:SetDesiredAngle(math.rad(-90)) lh:SetDesiredAngle(0) rh:SetDesiredAngle(0) rs:SetDesiredAngle(math.rad(90)) rs.C0 = CFrame.new(0.6,0.4,rs.C0.Z)*CFrame.Angles(0,math.rad(105),0) ls.C0 = CFrame.new(-0.2, 0.6, -0.5)*CFrame.Angles(0,math.rad(-100),0)
and it broke in Play mode, although it's fine in Studio. No Output, what's wrong?
Btw, this isn't the whole script, and you probably think I forgot my ends, which are at the end of the script. This is the only part of the script you will most likely need.
s = script.Parent ammo = script.Parent.AmmoGui:Clone() player = game.Players.LocalPlayer character = player.Character rs = character.Torso["Right Shoulder"] ls = character.Torso["Left Shoulder"] rh = character.Torso["Right Hip"] lh = character.Torso["Left Hip"] reload = false currentcamera = Workspace.CurrentCamera
s.Equipped:connect(function(mouse) for i, v in ipairs(s.Handle:GetChildren()) do if v:IsA("Weld") then v:Destroy() end end for i, v in ipairs(s.Clip1:GetChildren()) do if v:IsA("Weld") then v:Destroy() end end for i, v in ipairs(character.Torso:GetChildren()) do if v:IsA("Motor6D") then v.MaxVelocity = 0.3 end end if character:FindFirstChild("Animate") then character.Animate.Disabled = true end function weld(part0,part1,c0) local weld = Instance.new("Weld",part0) for n,o in pairs({C0=c0,Part0=part0,Part1=part1})do weld[n] = o end return weld end h = s.Handle weld(h,s.BackSight1,CFrame.new(0.06,0.47,-0.7)) weld(h,s.BackSight2,CFrame.new(-0.06,0.47,-0.7)) weld(h,s.BackSightDecoration1,CFrame.new(0.06, 0.54, -0.7)) weld(h,s.BackSightDecoration2,CFrame.new(-0.06, 0.54, -0.7)) weld(h,s.BarrelHole,CFrame.new(0, 0.3, 1.53)*CFrame.Angles(math.rad(90),0,0)) weld(h,s.Body,CFrame.new(0,0.3,0.37)*CFrame.Angles(math.rad(90),0,0)) clip = weld(h,s.Clip1,CFrame.new(0.33,0.3,0.32)) -- Clip variable weld(s.Clip1,s.Clip2,CFrame.new(0.154,0,0.008)*CFrame.Angles(0,math.rad(-11),0)) weld(s.Clip1,s.Clip3,CFrame.new(0.379,0,0.064)*CFrame.Angles(0,math.rad(-15),0)) weld(h,s.ClipHold,CFrame.new(0.27,0.3,0.32)) weld(h,s.ClipHole,CFrame.new(0.3,0.3,0.32)) weld(h,s.FakeHandle,CFrame.new(0,0,0)*CFrame.Angles(math.rad(20),0,0)) weld(h,s.FrontSight,CFrame.new(0,0.49,1.55)) weld(h,s.HandleDecoration1,CFrame.new(0,-0.188,-0.068)*CFrame.Angles(math.rad(20),0,0)) weld(h,s.HandleDecoration2,CFrame.new(0, -0.094, -0.034)*CFrame.Angles(math.rad(20),0,0)) weld(h,s.HandleDecoration3,CFrame.new(0,0,0)*CFrame.Angles(math.rad(20),0,0)) weld(h,s.Light,CFrame.new(0,0.08,1.51)*CFrame.Angles(math.rad(90),0,0)) weld(h,s.Lighthold,CFrame.new(0,0.09,1.45)) weld(h,s.Stock1,CFrame.new(0,0.31,-1.24)) weld(h,s.Stock2,CFrame.new(0,0.14,-1.44)) weld(h,s.StockHold1,CFrame.new(0.19,0.31,-0.93)) weld(h,s.StockHold2,CFrame.new(-0.19,0.31,-0.93)) weld(h,s.StockHold3,CFrame.new(0,0.31,-1.04)) weld(h,s.StockHold4,CFrame.new(-0.149, 0.31, -0.754)*CFrame.Angles(0,math.rad(39),0)) weld(h,s.StockHold5,CFrame.new(0.153, 0.31, -0.758)*CFrame.Angles(0,math.rad(-39),0)) weld(h,s.Trigger,CFrame.new(0,0.11,0.258)*CFrame.Angles(math.rad(-9),0,0)) weld(h,s.Triggercover,CFrame.new(0,0.1,0.4)) weld(h,s.TriggercoverBottom,CFrame.new(0,0.01,0.27)) ammo.Parent = game.Players.LocalPlayer.PlayerGui wait() ls:SetDesiredAngle(math.rad(-90)) lh:SetDesiredAngle(0) rh:SetDesiredAngle(0) rs:SetDesiredAngle(math.rad(90)) rs.C0 = CFrame.new(0.6,0.4,rs.C0.Z)*CFrame.Angles(0,math.rad(105),0) ls.C0 = CFrame.new(-0.2, 0.6, -0.5)*CFrame.Angles(0,math.rad(-100),0) mouse.Icon = "rbxasset://textures\\GunCursor.png" |
|
|
| Report Abuse |
|