So, I made this cloud that basically levitates and follows me but when I reset, it just stays there and does nothing, like it broke. So, when I die, I want it to come back to me, or get destroyed, thanks!
b = Vector3.new(0,19,0) a = Vector3.new(0,20,0) c = Vector3.new(0,10,0) puff= game.Workspace.puffscocofeafea.Torso humanoid = game.Workspace.puffscocofeafea.Humanoid brick = Instance.new("Part", game.Workspace) brick.Name = "Float" brick.Size = Vector3.new(6, 4.58, 1.57) brick.BottomSurface = "Smooth" brick.TopSurface = "Smooth" puffposition=puff.Position mesh = Instance.new("SpecialMesh",brick) mesh.Scale = Vector3.new(10,10,10) mesh.TextureId = "http://www.roblox.com/asset/?id=1095709" mesh.MeshType = "FileMesh" mesh.MeshId = "http://www.roblox.com/asset/?id=1095708" mesh.VertexColor = Vector3.new(1,1,1) lasso = Instance.new("SelectionPartLasso", brick) lasso.Humanoid = humanoid lasso.Part = brick force = Instance.new("BodyPosition",brick) force.maxForce = Vector3.new(50000, 50000, 50000) while true do wait(.001) force.position = puff.Position + c wait(.2) end
Try using this
its better to use
while wait() do
than while true do
b = Vector3.new(0,19,0) a = Vector3.new(0,20,0) c = Vector3.new(0,10,0) puff= game.Workspace.puffscocofeafea.Torso humanoid = game.Workspace.puffscocofeafea.Humanoid brick = Instance.new("Part", game.Workspace) brick.Name = "Float" brick.Size = Vector3.new(6, 4.58, 1.57) brick.BottomSurface = "Smooth" brick.TopSurface = "Smooth" puffposition=puff.Position mesh = Instance.new("SpecialMesh",brick) mesh.Scale = Vector3.new(10,10,10) mesh.TextureId = "http://www.roblox.com/asset/?id=1095709" mesh.MeshType = "FileMesh" mesh.MeshId = "http://www.roblox.com/asset/?id=1095708" mesh.VertexColor = Vector3.new(1,1,1) lasso = Instance.new("SelectionPartLasso", brick) lasso.Humanoid = humanoid lasso.Part = brick force = Instance.new("BodyPosition",brick) force.maxForce = Vector3.new(50000, 50000, 50000) while wait() do wait(.001) force.Position = puff.Position + c wait(.2) if humanoid.Health == 0 then brick:Destroy() end end
It should remove it when the player dies.