You saw the title, and this is a really simple question. If you’ve ever played Murder Mystery 2, you’ve probably opened a crate, and it looked like this.
My question is, how would I even start with this?
You saw the title, and this is a really simple question. If you’ve ever played Murder Mystery 2, you’ve probably opened a crate, and it looked like this.
My question is, how would I even start with this?
Well you could start by making the ui for it if you havent already done that. as for the scripting part id first make a function that moves all the currently visible items to the left/right and moves the ones offscreen to the other side. making clones instead of moving is also a viable option but im pretty sure it might be more performance heavy. When it moves the items onto the screen you set the name, colour, and image if you want that aswell. you can keep calling the function, but with a slower speed variable each time (make the function have a speed input which controls how much the items move). hopefully this should give you a good start! remember to edit it for how it needs to work for you
Hmm this is really interesting. I suppose you could have a module script with all the items in the game and their rarity and use it to choose a random item. You could also have a template frame with a viewport which is the frame the player will use, and a UiListLayout in the moving frame. Now for the rotating thing, you could have a loop that moves the frame less and less as time passes. Smth like
while offset > 0 do
local ti = TweenInfo.new(.01.Enum.EasingStyle.Linear,Enum.EasingDirection.In)
local goal = {Position = UDim2.new(movingframe.Position.X - offset,0,1,0)}
TS:Create(movingframe,ti,goal):Play()
offset -= .5
local knife = KnifeChooser.ChooseKnife()
local knifegui = GuiEditor:ApplyInfoToTemplate(knife)
knifegui.Parent = movingframe -- The frame that is moving from right to left
task.wait()
end
I suppose you could make a function to change the knife that will be picked, but that’s up to you
Alright, this worked for me, thanks.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.