#Need help
1 messages · Page 1 of 1 (latest)
How u doing .hit
I mean touched or whatever
you need to define the cloned part in the touch event
local collectionPart = script.Parent
collectionPart.Touched:Connect(function(otherPart)
print(otherPart)
end)
it works if like I touch it just not the part
how would I do that?
local spawnButton = script.Parent
local spawnerPart = game.Workspace:WaitForChild("SpawnerPart")
local replicatedStorage = game:GetService("ReplicatedStorage")
local apple = replicatedStorage.Apple
local debounce = true
local value = 1
spawnButton.MouseButton1Click:Connect(function()
if debounce then
debounce = false
local appleClone = apple:Clone()
appleClone.Parent = workspace
appleClone.CFrame = spawnerPart.CFrame * CFrame.new(0, 2, 0)
task.wait(2)
debounce = true
end
end)
so apple is the part right
we need to see the script with the touched event
also your cloning it on the client not the server
we need to see the script with the touched event
we need to see the script with the touched event
we need to see the script with the touched event
the one I gave earlier
the full script
literally just local collectionPart = script.Parent
collectionPart.Touched:Connect(function(otherPart)
print(otherPart)
end)
thats all it is
its in the collection part
** You are now Level 1! **
and that is in replicatedstorage?
do you know why its not printing?
What is collection part
How you find path to it?
Or you just tell
local collectionPart = workspace.Apple
Oh wait i didnt saw
Mb
Does apple have canTouch in their properties?
Yeah can touch is true and it’s not anchored
No errors?
This doesn't work due to roblox physics
If you set the parts cframe directly into the part you want the .Touched to fire for, it won't detect it as being touched
Wait, I misunderstood what was happening
You're having a part drop onto another not directly into it
This should be printing ngl
Wait a minute, are you making sure the apple is actually landing on the collection part in game
Because that CFrame looks a lil off there
yeah it is, the cframe offset is to make it spawn on the conveyor
if I just have the apple in the workspace it and put it on the conveyor belt, so it must be missing something since its being cloned