So I’m new to scripting and can do basic things, I started working on a simulator game but I don’t know how I could add this feature to my game…
(like PS99 VVV )
So I have an egg model so when you walk up to it it opens up a billboardGui with a Heartbeat function, then when you click on the billboardGui it will open up a ScreenGui with multiple buttons. One button is to close and the other buttons are BUY 1, BUY 8, and BUY 16. I wanted to make it so when you click on one of the buttons it would animate the ScreenGui to the bottom of the screen with TweenService and then the ViewportFrame of the eggmodel would apear… after this you could tap a couple times to open the egg and obtain your pet.
I already have seen multple egg system videos but they all use a ProximityPrompt (which I dont want)
So I know it’s a lot but what would be the best way to do this?
The best way to do that would be as you said. Take a few hours and figure the details out. The only real difference between what you are describing and the proximity-prompt methods are just that (the proximity prompt itself). Unless I am missing something, this is pretty simple.
What is wrong with the system you have set up so far? Let me know the details of what goes wrong so I can help you out.
The thing I am struggling on is the fact that I have 1 ScreenGui and many eggs so I don’t know if I would have to duplicate the Gui for EVERY single egg… I am just so confused on what to do first. I just don’t understand this.
-- This localscript should be parented to the ViewportFrame or you can just modify it
script.Parent.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
script.Parent:TweenPosition(UDim2.new(script.Parent.Position.X.Scale, 0, 1), Enum.EasingStyle.Back)
-- Fire a remote event here
end
end)
Another thing, would I have to list the type of pets in a module script inside each egg with all the data like how much it costs to open it and the chances of each pet? So then I can make it so when I press the specific egg it will only open those certain pets? And not some pets from a different egg?
Wait, if all the eggs are sharing that one ScreenGui how would I make it so when they press the button it will open an egg for those pets because the game won’t know what egg they are opening if they are just pressing a button from a shared ScreenGui (Another reason why I’m wondering if I should duplicate this, or can I also use collection service with this too?