#pet hatching doesnt work

123 messages · Page 1 of 1 (latest)

solar rose
#

So the egg animation plays but then none of this happen heres the code

#
script.Parent:WaitForChild("Hatching Animation").PetDisplay:GetDescendants().Visible = true
script.Parent:WaitForChild("Hatching Animation").PetName.Text = pet.Name
script.Parent:WaitForChild("Hatching Animation").PetRarity.Text = petRarity
local petModel = Module3D:Attach3D(script.Parent:WaitForChild("Hatching Animation").PetDisplay,pet)
petModel:SetDepthMultiplier(1.2)
petModel.Camera.FieldOfView = 5
petModel.Visible = true

RunService.RenderStepped:Connect(function()
    petModel:SetCFrame(CFrame.Angles(0,tick() * 2% (math.pi * 2),0) * CFrame.Angles(math.rad(-10),0,0))
end)
wait(3)
TweenService:Create(script.Parent:WaitForChild("Hatching Animation").PetDisplay:FindFirstChildOfClass("ViewportFrame"),TweenInfo.new(.5),{ImageTransparency = 1}):Play()
    wait(0.5)
    for i,v in pairs(script.Parent:WaitForChild("Hatching Animation").PetDisplay:GetDescendants()) do
    if v:IsA("ViewportFrame") then
        v:Destroy()
    end
end

    script.Parent:WaitForChild("Hatching Animation").PetDisplay.Visible = false 
    isHatching = false
    end)```
#

I don't know why it doesnt work

solar rose
#

it doesnt even turn visible

#

and no errors

#

like it makes no sence

#

thats just the part for the petdisplay

#

if you want the whole script I can send it

#

fixed.

solar rose
#

code

#

if script.Parent.Text == "Common" then script.Parent.TextColor3 = Color3.fromRGB(100,50,50)
elseif script.Parent.Text == "Uncommon" then script.Parent.TextColor3 = Color3.fromRGB(10,255,10)
elseif script.Parent.Text == "Rare" then script.Parent.TextColor3 = Color3.fromRGB(0,0,255)
elseif script.Parent.Text == "Epic" then script.Parent.TextColor3 = Color3.fromRGB(125,0,255)
elseif script.Parent.Text == "Secret" then script.Parent.TextColor3 = Color3.fromRGB(50, 63, 86)


end



#

this is supposd to change the color of something based on its name right

#

well it's not working for some reason

#

and ik i can make a table and everything but this is easier for me

#

and the table didnt work either

#

so please help

raw lichen
#

put a print in each one to see if it is actually running

solar rose
#

i did

#

i dont think it is

#

well its label at the start of everything

#

but once I start hatching

#

yeah its set as label rn

#

and its not running or else it would chang eit

carmine geode
#

did you make this?

solar rose
#

in 5 seconds ya

carmine geode
#

mhm

solar rose
#

after trying everything

#

idk the error with it

#

well there is none

solar rose
#

cus ill take any advice

#

this thing hasnt been workin in forever

#

nah still nothing with this thing

#

changed it to this

#

if script.Parent.Parent.PetDisplay.Visible == true then
if script.Parent == "Common" then script.Parent.TextColor3 = Color3.fromRGB(100,50,50)
elseif script.Parent.Text == "Uncommon" then script.Parent.TextColor3 = Color3.fromRGB(10,255,10)
elseif script.Parent.Text == "Rare" then script.Parent.TextColor3 = Color3.fromRGB(0,0,255)
elseif script.Parent.Text == "Epic" then script.Parent.TextColor3 = Color3.fromRGB(125,0,255)
elseif script.Parent.Text == "Secret" then script.Parent.TextColor3 = Color3.fromRGB(50, 63, 86)

end
end

#
if script.Parent.Parent.PetDisplay.Visible == true then
if script.Parent == "Common" then script.Parent.TextColor3 = Color3.fromRGB(100,50,50)
elseif script.Parent.Text == "Uncommon" then script.Parent.TextColor3 = Color3.fromRGB(10,255,10)
elseif script.Parent.Text == "Rare" then script.Parent.TextColor3 = Color3.fromRGB(0,0,255)
elseif script.Parent.Text == "Epic" then script.Parent.TextColor3 = Color3.fromRGB(125,0,255)
elseif script.Parent.Text == "Secret" then script.Parent.TextColor3 = Color3.fromRGB(50, 63, 86)

end
end



raw lichen
#

can I see where all this is in the workspace

solar rose
#

sure

#

its in a screengui

raw lichen
#

if script.Parent == "Common" then

solar rose
#

oh sh

#

oops

raw lichen
#

💀

solar rose
#

not name

#

text

#

but yeah i get what ur saying

raw lichen
#

o ok

solar rose
#

it still wont work

raw lichen
#

💀

solar rose
#

ya

#

doesnt work

raw lichen
#

put a print before and see if the script itself is even runnning

solar rose
#

oh it is

#

i did one earlier like 2mins ago

raw lichen
#

ah ok

#

double check the text of the label

solar rose
#

did that

#

allready

raw lichen
#

is there anything eles in the script or just that?

solar rose
#

just this

raw lichen
#

wow

#

ima have to open up studio for this then lol

solar rose
#

lol

#

theres another problem aswell

#

not as big but

#

whener I hatch an egg

#

I wait like 6 seconds

#

to hatch another

#

and half the time the animation doesnt play

#

idk but ill fix that l8r

raw lichen
#

u sure petdisplay is visible

solar rose
#

ye

#

like when hatching

#

it is

#

so this script should be when its visible

#

oh

#

oh

#

oh

#

OOPS

raw lichen
#

wut

solar rose
#

it is visible

raw lichen
#

bruh

solar rose
#

24

#

seven

#

ya

#

wait nevermind

raw lichen
#

huh?

solar rose
#

thats my fault

#

it still wont work

#

but

raw lichen
solar rose
#

its not supposed to b

#

IM TELLIN YOU

#

this game is weird as hell

#

ya

#

it still doesnt work

#

lol

raw lichen
#

bruh 💀

solar rose
#

I KNOW

#

like idk

solar rose
#

i have a script

#

exactly like this

#

and it works

#

like identical

#

except for the first part

#

r u testin it out rn

raw lichen
#

ye it works fine

#

theres nothing wrong witht the code

solar rose
#

wait but

#

does like it work

#

for u

raw lichen
#

ye

solar rose
#

HUH

#

???

raw lichen
#

🤷‍♂️

solar rose
#

can i screenshare

#

on a vc with u

#

ill mute

raw lichen
#

ig

solar rose
#

ok