#Why does my egg not work

1 messages · Page 1 of 1 (latest)

late estuary
#

For some reason when imy egg is in replicatedstorage and i clone it to make it's parent workspace. It wont work.
But when its already in workspace it does work?

Script to spawn the egg:


    
            Kitkat.Parent = game.Workspace
            Kitkat.PrimaryPart.Position = game.Workspace.EggSpawn.Position
            task.wait(1)
            Kitkat.PrimaryPart.Anchored = true
            Kitkat.KitKatEgg.Script.Enabled = true
            ```

Script inside the egg:
```local BadgeService = game:GetService("BadgeService")
local badgeId = 1150138684271351
local click = script.Parent.ClickDetector

click.MouseClick:Connect(function(player)
    local hasBadge = BadgeService:UserHasBadgeAsync(player.UserId, badgeId)
    if not hasBadge then
        BadgeService:AwardBadgeAsync(player.UserId, badgeId)
    
    end
    script.Parent:Destroy()
    
end)

Sorry for the bad quality on the videos✌

astral spoke
#

@late estuary

late estuary
#

yes

astral spoke
#

The part where you move the primary part instead of that do model:MoveTo(Vector3)

late estuary
#

ok

astral spoke
#

because from what i know is that when you move the primary part the model doesn't follow

late estuary
#

it doesnt work

#

@astral spoke

astral spoke
#

okay

#

@late estuary

#

Is the bug with the spawning or getting the badge?

short saddle
#

Is the script a local script? If yes then it cannot move the parent without roblox deleting it.

late estuary
astral spoke
late estuary
short saddle
late estuary
#

idk if im doing something wrong

short saddle
crystal surge