I want it so there is a smore on a table, when the player clicks it they pick it up, but the smore is still on the table for others to pick up to. How is this possible? Here is my script:
script.OnTouched = false
script.Parent.MouseButton1 = true do
script.Parent.OnTouched = true
end
end
5 Likes
1NoFree
(likeCrazy)
May 14, 2022, 4:06pm
#3
Put ClickDetector
in Handle
.
script.Parent.Handle:Waitforchild("ClickDetector").MouseClick:Connect(function(player)
script.Parent:Clone().Parent = player.Backpack
end)
If this work, please mark this post as Solution!
1 Like
There seem to be many underlines under the script. I also don’t seem to be able to pick it up.
1NoFree
(likeCrazy)
May 14, 2022, 4:08pm
#5
I found a typo but nvm I edited that
Can I please have the edited version? Never mind I found it
1NoFree
(likeCrazy)
May 14, 2022, 4:09pm
#7
Can you try this?
script.Parent.Handle:Waitforchild("ClickDetector").MouseClick:Connect(function(player)
script.Parent:Clone().Parent = player.Backpack
end)
1NoFree
(likeCrazy)
May 14, 2022, 4:10pm
#8
Don’t forget to add ClickDetector
in Handle part
I did so but I still can’t pick it up. Even with the ClickDetector
1NoFree
(likeCrazy)
May 14, 2022, 4:11pm
#10
Put script inside tool. not a Handle
Attyuo2
(Attyuo2)
May 14, 2022, 4:12pm
#11
You’d do it on the client, then.
I still can’t pick it up. I made it look just like yours.
How would I do it in the client?
1NoFree
(likeCrazy)
May 14, 2022, 4:18pm
#15
Can I see your Explorer?
(char limit)
1NoFree
(likeCrazy)
May 14, 2022, 4:22pm
#18
Oh sorry I made more typo
This may work:
script.Parent.Handle:WaitForChild("ClickDetector").MouseClick:Connect(function(player)
script.Parent:Clone().Parent = player.Backpack
end)
Sorry!
I already tried removing the ClickDetector
in the handle. Does not work.
For a ClickDetector to work, you need to parent it to a BasePart