#Need help

1 messages · Page 1 of 1 (latest)

indigo adder
#

Hi I’m spawning in a part by cloning it through replicated storage and having it hit a collection part but it’s not triggering the touched event does any one know why?

rain stone
#

I mean touched or whatever

novel wren
#

you need to define the cloned part in the touch event

indigo adder
#

it works if like I touch it just not the part

indigo adder
novel wren
#

collection part is your original part

#

show us the whole script

indigo adder
#

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)

novel wren
#

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

indigo adder
#

yeah apples the part

#

how would I clone it to the server?

novel wren
#

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

indigo adder
#

the one I gave earlier

novel wren
#

the full script

indigo adder
#

literally just local collectionPart = script.Parent

collectionPart.Touched:Connect(function(otherPart)
print(otherPart)
end)

#

thats all it is

novel wren
#

oh

#

well

#

where is the script

#

inside of replicated storage?

#

like the part

indigo adder
#

its in the collection part

sacred fulcrumBOT
#

studio** You are now Level 1! **studio

novel wren
#

and that is in replicatedstorage?

indigo adder
#

no thats in the workspace

#

the apple is in replicated storage

novel wren
#

...

#

okay i misunderstood

indigo adder
#

do you know why its not printing?

tame chasm
#

How you find path to it?

#

Or you just tell
local collectionPart = workspace.Apple

#

Oh wait i didnt saw

#

Mb

tame chasm
indigo adder
#

Yeah can touch is true and it’s not anchored

tame chasm
#

No errors?

tiny cargo
#

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

tiny cargo
#

Because that CFrame looks a lil off there

indigo adder
#

yeah it is, the cframe offset is to make it spawn on the conveyor

indigo adder
#

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