CakeValxie
(15Alloys)
December 5, 2021, 12:27pm
#1
[SOLVED, JUST NEEDED TO TURN OF CANTOUCH ON HANDLE THANKS FOR ALL THE HELP EVERYONE!]
Hi so I use click detector for my crisps. It works but this annoying TouchInsert thing is put in my lays chip tool before grabbing it. Here is an Image:
Its very annoying. Because My Click Detector works but what is the use of Roblox automatically adding TouchInsert when I only want ClickDetector! Could someone tell me how to stop adding TouchInsert so when I walk into it I can only grab it by clicking on it? Also I need some help cloning crisps. I want the clone Infinte so the Item dosen’t disappears and the Item will stay for the next person.
If you need to know what script I use please ask by replying.
Thanks.
regexman
(reg)
December 5, 2021, 12:32pm
#2
It’s probably because one of your scripts has a Touched event connected to the tool’s handle. It’s normal
May I ask, what are the 2 scripts code?
1 Like
GOODEVER
(goodever)
December 5, 2021, 12:33pm
#3
script.Parent.ChildAdded:Connect(function(Child)
if Child.Name == "TouchInterest" then
Child:Destroy()
end
end)
This script removes TouchInterest everytime it is added to the handle. (Put this inside of the handle)
regexman
(reg)
December 5, 2021, 12:35pm
#4
This would error as touchinterest can’t be deleted.
1 Like
CakeValxie
(15Alloys)
December 5, 2021, 12:35pm
#5
This is my eating script:
local Tool = script.Parent;
enabled = true
function onActivated()
if not enabled then
return
end
enabled = false
Tool.GripForward = Vector3.new(0.675, -0.675, -0.3)
Tool.GripPos = Vector3.new(0.4, -0.9, 0.9)
Tool.GripRight = Vector3.new(0.212, -0.212, 0.954)
Tool.GripUp = Vector3.new(0.707, 0.707, 0)
Tool.Handle.DrinkSound:Play()
wait(.8)
local h = Tool.Parent:FindFirstChild(“Humanoid”)
if (h ~= nil) then
if (h.MaxHealth > h.Health + 1.6) then
h.Health = h.Health + 1.6
else
h.Health = h.MaxHealth
end
end
Tool.GripForward = Vector3.new(-1, 0, 0)
Tool.GripPos = Vector3.new(.2, 0, 0)
Tool.GripRight = Vector3.new(0, 0, -1)
Tool.GripUp = Vector3.new(0,1,0)
enabled = true
end
function onEquipped()
Tool.Handle.OpenSound:play()
end
script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)
My Click detector script (which works):
local tool = script.Parent.Parent
local click = script.Parent.ClickDetector
local function pickup(player)
tool.Parent = game.Workspace[player.Name]
end
click.MouseClick:Connect(pickup)
GOODEVER
(goodever)
December 5, 2021, 12:36pm
#6
Can you show me the error? Because it works for me
1 Like
CakeValxie
(15Alloys)
December 5, 2021, 12:37pm
#7
Is this supposed to be a Script or LocalScript? I used a script.
regexman
(reg)
December 5, 2021, 12:38pm
#8
I think this is normal as your tool is in workspace, it’s used to detect if a player touched it so the tool equips.
Please don’t use a remover script
1 Like
GOODEVER
(goodever)
December 5, 2021, 12:38pm
#9
Its a script inside of the handle
1 Like
CakeValxie
(15Alloys)
December 5, 2021, 12:39pm
#10
But how do I stop it from getting it grabbed when walking in to it though?
regexman
(reg)
December 5, 2021, 12:40pm
#11
I recommend you don’t. It might break if the player dropped the tool and tries to get it back.
If you want to truly remove it, you might have to make an equip tool system
However, that touchinterest is handy for a “click to equip” tool systems as they can remove that so you can’t equip by walking, but by clicking
1 Like
CakeValxie
(15Alloys)
December 5, 2021, 12:44pm
#13
I might need to make a barrier in my shop, I don’t know really.
regexman
(reg)
December 5, 2021, 12:45pm
#14
Here’s a code if you really need it, but it will break if you drop it.
script.Parent.Equipped:Connect(function()
script.Parent.Handle.TouchInterest:Destroy()
end)
Put this inside tool , not handle
SkrubDaNub
(ComradeSkrub)
December 5, 2021, 12:45pm
#15
By turning off CanTouch to the handle, the TouchInterest should in theory automatically be deleted.
3 Likes
CakeValxie
(15Alloys)
December 5, 2021, 12:47pm
#16
Thank You, this actually worked. It took 1 hour for me to figure it out, but thank you so much!
1 Like
CakeValxie
(15Alloys)
December 5, 2021, 12:47pm
#17
Thank you for your help but Comrade figured out the solution. But I am glad you helped me, thank you.