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

Why won't it clone the tool when they click the part?

game.Workspace.C.ClickDetector.MouseClick:Connect(function(click)
	local clone = game.Workspace.C:Clone()
	clone.Parent = click.Backpack
end)

Idk why I don't know how to do this...

7 comments

0

because click is the player who clicked the part, and the parent of it is the players service, which isnt a character

0

so you can essentially get rid of the player variable entirely

0

Okay thanks

0

so then how is the script supposed to look like?

0

without lines 1, 3, 4, and 7

0

oh and change line 6 player1 to click

0

But it still doesn't work

1 answer

Use "MouseButton1Click" to determine a left click (MouseButton2Click for a right click).

game.Workspace.C.ClickDetector.MouseButton1Click:Connect(function(click)
    local clone = game.Workspace.C:Clone()
    clone.Parent = click.Backpack
end)

2 comments

0

I hope this can help you since this looks like not much help. Since you edited the question I don't fully understand the initial problem, but, tell me if it works, @bluemountainlion.

0

@KDarren12 17:20:48.519 - MouseButton1Click is not a valid member of ClickDetector

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