Script
local brick = script.Parent brick.Changed:connect(function() if brick.Velocity.magnitude > 2 then if script.Parent.Touched then brick:Breakjoints() end end end
Error code
18:19:14.977 - Workspace.Part.Script:8: ')' expected (to close '(' at line 2) near '<eof>'
thank you for your time
When you are using an anonymous function you require a ')' at the end to close the connection that you have opened.
EDIT: Just read the rest of your code too after a comment pointing it out as I initially only searched for the error you posted, I assume that this is your goal:
local brick = script.Parent brick.Touched:Connect(function() if brick.Velocity.Magnitude > 2 then brick:BreakJoints() end end)
thank you so much heres the advanced break joints script that doesnt kill the character,or remove the accessorys and will only break if it hits a object at a certain speed
script.Parent.Touched:Connect(function(part) local h = part.Parent:findFirstChild("Humanoid") local g = part.Parent.Parent:findFirstChild("Head") local s = script.Parent.Velocity.Magnitude if h==nil then if g==nil then if s>0.001 then part:BreakJoints() end end end end)