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

Why the Part from the dropper not changed to plastic?

at the Output, The output says: Attempt to connect failed: Passed value is not a function. nah, that's the problem at the output, and the Part from the Dropper not changed be a plastic if the Part touched the Block (like an upgrader).

local Part = game.Workspace.ChildAdded:Connect("Part, workspace.PartStorage")

script.Parent.Block.Touched:Connect(function(Part)
	if Part.Touched then
		Part.Changed = Enum.Material.Plastic
	end
end)

Make it to script or Says the problem and write the problem, so that, i can write at the script

Thanks :)

1 answer

✓ Accepted answer

I'm not entirely certain what you're trying to do here. Each BasePart has a property named Material which refers to its current Material as an Enum. There are also several other things wrong with your script:

  • Changed is an RBXScriptSignal, not a standard property. It expects you to assign it to a function because it's supposed to fire to that function. It will tell you if the passed value is not a function.
  • Touched should not be used as a condition, that's just not how RBXScriptSignals work. If you want to check if something touches a part, you need to fire the signal and check which part hit it.
  • Your first signal-linked function (ChildAdded) is missing a given function; you gave it a string. I'm not sure if this is intentional, or if you intended to do something else.

2 comments

0

ehh, but areyou can write the script?, if can't it's okay :)

0

so, should i put the event function? if so, where should I put it?

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