You can write your topic however you want, but you need to answer these questions:
-
**What do you want to achieve?
I want the eggs to flip -
**What is the issue?
2 or 3 eggs flip, but then the impulse function seems to have no affect. -
What solutions have you tried so far?
Tried changing network ownership and increasing the thickness of colliding parts.
This is the game link uncopylocked:
https://www.roblox.com/games/9319564409/Egg-Stops-Flipping
Can anyone tell me why all the eggs don’t flip?
Here is the script:
local DS = game:GetService("Debris")
local y = 22
local pan = Instance.new("Part")
pan.CFrame = CFrame.new(Vector3.new(-1.5, 2.26, 9.966))
pan.Anchored = true
pan.CanCollide = false
pan.Transparency = 1
pan.CanTouch = false
pan.Parent = game.Workspace
local connList= {}
wait(4)
local function makeEgg(skil,parent,player,x)
local mod = Instance.new("Model")
mod.Name = "Egg"..tostring(x)
local shell:Part = Instance.new("Part")
shell.Transparency = 1
shell.Material = Enum.Material.Plastic
shell.BrickColor = BrickColor.new("White")
shell.TopSurface = Enum.SurfaceType.Smooth
shell.BottomSurface = Enum.SurfaceType.Smooth
shell.CanCollide = true
shell.CanTouch = true
shell.Name = "Shell"
local egg = Instance.new("Part")
egg.Shape = Enum.PartType.Cylinder
egg.Size = Vector3.new(.12,1.2,1.2)
egg.CFrame = (skil.CFrame * CFrame.Angles(0,0,math.pi/2)) + skil.CFrame:VectorToWorldSpace(Vector3.new(0,2.2,.25))
egg.BrickColor = BrickColor.new("White")
egg.Name = "Whites"
egg.CanCollide = true
egg.CanTouch = false
local yolk = Instance.new("Part")
yolk.Shape = Enum.PartType.Ball
yolk.Size = Vector3.new(.38,.38,.38)
shell.Size = Vector3.new(egg.Size.Z, yolk.Size.Y,egg.Size.Z)
yolk.CFrame =egg.CFrame + Vector3.new(0,.12,0)
yolk.Name = "Yolk"
yolk.Parent =egg
yolk.CanCollide = true
yolk.CanTouch = false
yolk.BrickColor = BrickColor.new("New Yeller")
shell.CFrame = yolk.CFrame * CFrame.Angles(0,0,math.pi/2)
local w = Instance.new("WeldConstraint")
w.Part0 = shell
w.Part1 = yolk
w.Parent = shell
w = Instance.new("WeldConstraint")
w.Part0 = shell
w.Part1 = egg
w.Parent = shell
egg.Parent = shell
shell.Parent = mod
mod.PrimaryPart = shell
mod.Parent = parent
--shell:SetNetworkOwner(player)
--DS:AddItem(mod,120)
mod.Shell.Touched:Connect(function(part)
if part.Name == "Baseplate" then
y = mod.Shell.AssemblyMass *25
warn(string.format("Applying Impulse. Name=%s Mass=%f",mod.Name,y))
mod.Shell:ApplyImpulse(Vector3.new(0,y,0))
mod.Shell:ApplyAngularImpulse(Vector3.new(2,0,0))
end
end)
end
for x=1, 10, 1 do
makeEgg(pan,game.Workspace, nil,x)
wait(3)
end