Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why do I see the MouseButton3Click Error?

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)

2 comments

0

MouseButton3 doesn't exist...

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.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.