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

Why do I see the MouseButton3Click Error? [closed]

Asked by 8 years ago

Pls Help me Guys

CanDamage = true

script.Parent.MouseButton3Click:connect(function(part)
    local human = part.Parent:findFirstChild("Humanoid")
    if human then
    if human.Parent.Name ~= script.Parent.Parent.Name and
            CanDamage == true and script.Parent.SagAnim.Value == true then
                CanDamage = false
            human:TakenDamage(20)
            wait(1.7)
            CanDamage = true
        end
    end
end)
0
MouseButton3 doesn't exist... itsJooJoo 195 — 8y
0
MouseButton3 is a UserInputType, only provided through UserInputService and ContextActionService. It's not indicated through events of certain objects such as Mouse, TextButtons, ImageButtons, or other objects of which aren't quite new or modern. M39a9am3R 3210 — 8y

Locked by WideSteal321 and JesseSong

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 8 years ago
Edited 8 years ago

It doesn't exist

If you need to get input for the ScrollWheel (Mouse3) then you'll need to use UserInputService and UserInputType.MouseButton3. Alternatively use Freya Input and Action.BindSource to attach a function to the third mouse button. If you're not using a GUI object, I'd instead suggest Action.BindControl.

0
Nice English... User#6546 35 — 8y
Ad