I have a few parts with a BodyPosition and a BodyGyro. The parts keep spinning and I've tried to fix it.
Here is a little bit of code from what I'm trying to make:
local m = Instance.new("Model", char) m.Name = "fwdjawioffresetyoudwasdrmompphasdwhwwukcalloverit"
function BODYPOSITION(PARENT, POSITION) local BODYPOS = Instance.new("BodyPosition",PARENT) BODYPOS.Position = POSITION return BODYPOS end
function smooth(p1, p2, sp) local f1 = BODYPOSITION(p1, p2.Position) f1.MaxForce = Vector3.new(sp, sp, sp)
local g1 = Instance.new("BodyGyro",p1)
g1.CFrame = p2.CFrame
--g1.D = 20
g1.P = 300
g1.MaxTorque = Vector3.new(0, sp*2, 0)
thread(function()
while true do
Swait()
f1.Position = p2.Position
g1.CFrame = p2.CFrame
end
end)
end
local E = 0.75 local ZZ = 0.9 local k = Color3.new(1, 1, 1) local br = Color3.new(0, 0, 0)
local heyj = 4000000
local temp = Instance.new("Part", m) temp.Transparency = 1 temp.Size = Vector3.new(1, 1, 1) temp.CanCollide = false temp.Anchored = true temp.CFrame = cfra temp.Name = "Base"
local hedi = Instance.new("Part", m) hedi.Transparency = 0 hedi.Size = Vector3.new(2, 2, 2)*E hedi.CanCollide = false hedi.Anchored = true hedi.CFrame = cfra hedi.Color = br hedi.Material = "SmoothPlastic" hedi.Name = "Head"
local f1 = smooth(hedi, temp, heyj)
"cfra" is where the part should be CFramed to when I instance it.
By the way, the script I'm making is for a game named "Void Script Builder". I mainly make scripts there and I don't make many games anymore.
(by the way the code ends after this line: local f1 = smooth(hedi, temp, heyj))

3 comments
sorry the code ends after this line:
code ends after this line: local f1 = smooth(hedi, temp, heyj)
realized my mistake and fixed it