-
What do you want to achieve? Keep it simple and clear!
i want to copy a part’s properties when it changes -
What is the issue? Include screenshots / videos if possible!
my code is causing a error:
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried to look on developer hub a little bit but nothing helped me
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
here’s my code:
script.Parent.Changed:Connect(function(what)
if script.Parent:FindFirstChildOfClass('Part') then
part = script.Parent:FindFirstChildOfClass('Part')
part[what] = script.Parent[what] -- problem here
end
end)
script.Parent.ChildAdded:Connect(function(what)
if script.Parent:FindFirstChildOfClass('Part') then
part = script.Parent:FindFirstChildOfClass('Part')
local clone = what:Clone()
clone.Parent = part
end
end)
also this is my first post in devforum