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

I am trying to print when someone clicks the brick... Its not working though?

Asked by 4 years ago

Can You please help me?

script.Parent.ClickDetector(function(Clicked)
        local Player = game.Players.LocalPlayer
        if Player.Clicked == true then
        print("pressed")
    end
end)
1
Clicked is not a value in a player lmao, just remove the whole player part and print it. mixgingengerina10 223 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
script.Parent.ClickDetector.MouseClick:Connect(function(whom)
        local Player = game.Players.LocalPlayer
       if whom.Name == game.Players.LocalPlayer.Name then
        print("pressed")
    end
end)

should work now!

Ad

Answer this question