How would I make a gui frame visible when a player clicks another players torso? Should I use the click detector way or what, I am pretty clueless on this and I would like to know how.
mouse.?:connect(function() --What should I replace ? with?
I have the function and I know how to click the players torso, but should I do just MouseButton1Down or something?
Attempt
local plr = game.Players.LocalPlayer; local mouse = plr:GetMouse(); local Frame2 = script.Parent.Content mouse.MouseButton1Down:connect(function() if game.Players:GetPlayerFromCharacter(mouse.Target.Parent) then Frame2.Visible = true; end end)
Your attempt was almost correct; the event is "Button1Down" for the PlayerMouse object. You also need to check if the mouse has a target, otherwise the script will error.
local plr = game.Players.LocalPlayer; local mouse = plr:GetMouse(); local Frame2 = script.Parent.Content mouse.Button1Down:connect(function() if mouse.Target and mouse.Target.Parent and game.Players:GetPlayerFromCharacter(mouse.Target.Parent) then Frame2.Visible = true; end end)