pretty much my game runs smoothly until this script is ran which once the bolders are placed back (There shape is a ball) They turn pretty much into conveyers and try to fling the player off. How can I fix this?
script.Parent.ClickDetector.MouseClick:Connect(function()
if Debounce == false then
CoolDown.Enabled = false
script.Parent.Color = Color3.new(1,0,0)
Debounce = true
for i, part in pairs(TrollFallingParts:GetChildren()) do
if part:IsA("BasePart") then
part.Anchored = false
part.Sound:Play()
end
end
task.wait(5)
for i, object in pairs(TrollFallingParts:GetChildren()) do
if object:IsA("BasePart") then
object.Anchored = true
end
end
TrollFallingParts.Part.CFrame = PartOrigin
TrollFallingParts.Part2.CFrame = Part2Origin
TrollFallingParts.Part3.CFrame = Part3Origin
TrollFallingParts.Part4.CFrame = Part4Origin
TrollFallingParts.Part5.CFrame = Part5Origin
task.wait(10)
script.Parent.Color = Color3.new(0,1,0)
Debounce = false