someone said Clickdetector is returning Player
But I dont have any ideas to do
help me please
local shoose = game.ServerStorage.Shoose
script.Parent.ClickDetector.MouseClick:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
if not hit.Parent:FindFirstChild("Shoose") then
shoose:Clone().Parent = hit.Parent
end
end
end)
local shoose = game.ServerStorage.Shoose
script.Parent.ClickDetector.MouseClick:Connect(function(player)
if player then
if not player:FindFirstChild("Shoose") then
shoose:Clone().Parent = hit.Parent
end
end
end)
local shoose = game.ServerStorage.Shoose
script.Parent.ClickDetector.MouseClick:Connect(function(player)
if player then
if not player.Character:FindFirstChild("Shoose") then
shoose:Clone().Parent = player.Character
end
end
end)
local shoose = game.ServerStorage.Shoose
script.Parent.ClickDetector.MouseClick:Connect(function(plr) -- (player, not character)
local char = plr.Character -- selecting player's character --
if not char:FindFirstChild("Shoose") then
shoose:Clone().Parent = char -- placing tool in plr character --
end
end)
local shoose = game.ServerStorage.Shoose
script.Parent.ClickDetector.MouseClick:Connect(function(player)
if player then
local char = player.Character or player.CharacterAdded:Wait()
if not char:FindFirstChild("Shoose") then
shoose:Clone().Parent = char
end
end
end)
local shoose = game.ServerStorage:WaitForChild("Shoose")
script.Parent.ClickDetector.MouseClick:Connect(function(hit)
for _,v in pairs(game.Workspace:GetChildren()) do
if v.Name == hit.Name then
if not v:FindFirstChild("Shoose") then
shoose:Clone().Parent = v
end
end
end
end)