I am making a script that turns players into stone when they touch its parent, I made the script but when I try it, nothing happens. although the script is small, I would greatly appreciate the help. here is the script:
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
local c = h.Parent:GetChildren()
c.UsePartColor = true
c.Material = ("Slate")
c.BrickColor = BrickColor.new(1)
c.Anchored = true
end
connection = bin.Touched:connect(onTouched)

7 comments
Thank you very much, but it does not seem to work.
Well, is bin a part?
I don't think so
What's it's ClassName?
oh, it is a part
but I would also like it to work on Unions and Wedges
I found the problem and fixed it, thank you very much for your help, it means a lot