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

Zoom Script Messed Up, Help?

Asked by
KAAK82 16
10 years ago
local Tool = script.Parent
BP = Tool.Parent

local Player = game.Players.LocalPlayer
local Mouse = game.Players.LocalPlayer:GetMouse()

Tool.Equipped:connect(function ()

Mouse.Button2Down:connect(function()
    if not a then
        Tool.Recoil.Value = 5
        Tool.Aim.Value = 0.1
        Tool.ZoomedIn.Value = true
        Tool.Parent.Humanoid.WalkSpeed = 7
        a=true
        Tool.GripPos = Vector3.new(0.25, -0.1, 1.25)
    wait(0.07)
        Tool.GripPos = Vector3.new(0.3,-0.2, 1)
    wait(0.07)
        Tool.GripPos = Vector3.new(0.4,-0.35, 0.75)
    wait(0.07)
        Tool.GripPos = Vector3.new(0.5,-0.5, 0.5)
    elseif
Mouse.Button2Up:connect(function()
        Tool.ZoomedIn.Value = false
        Tool.Recoil.Value = 7.5
        Tool.Aim.Value = 10
        Tool.Parent.Humanoid.WalkSpeed = 10
        a=false
        Tool.GripPos = Vector3.new(0.5,-0.5,0.5)
    wait(0.07)
        Tool.GripPos = Vector3.new(0.4,-0.35,0.75)
    wait(0.07)
        Tool.GripPos = Vector3.new(0.3,-0.2,1)
    wait(0.07)
        Tool.GripPos = Vector3.new(0.25, -0.1, 1.5)

script.Parent.Equipped:connect(function()
end)
end) then
end
end)
end)

it just Zooms and stays in Zoom Mode the first time u click, but then after it's alright... I wanna know y... this is for my Friend, he needs my Help... so as I said, the first time it zooms and stays in Zoom, but then after, it works properly (RMB to Zoom, Release RMB to Stop Zoom)...

Answer this question