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

script that adds click detector not working?

Asked by 2 years ago

i want to make it so you can click a player but it is not working

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
    local clickDetector = Instance.new("ClickDetector")
    clickDetector.Parent = player.Character
end)

1 answer

Log in to vote
1
Answered by 2 years ago

Think I fixed It (Is It a local script btw?)

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
    local clickDetector = Instance.new("ClickDetector")
    clickDetector.Parent = player.Character.Torso
end)
Ad

Answer this question