Hello, I recently made a new system for my menu. You select a model/creature and it morphs you as it
Also is there a way I can make the models picture appear on a gui?
How does the script look?
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local event = ReplicatedStorage:WaitForChild("MorphSupplies"):WaitForChild("Events"):WaitForChild("Fire")
local morphs = ReplicatedStorage:WaitForChild("MorphSupplies"):WaitForChild("Morphs")
local Event = game.ReplicatedStorage:WaitForChild("Respawn")
local Menu = script.Parent
local Selected = Menu.Selected
local Cover = Menu.Cover
local MenuFrame = Menu.MenuFrame
local ScrollingFrame = MenuFrame.ScrollingFrame
local TextPart = MenuFrame.TextPart
local Bar = MenuFrame.Bar
local CreaturesText = MenuFrame.CreaturesText
local InfoText = MenuFrame.InformationText
local Desc = MenuFrame.Desc
local Play = MenuFrame.Play
local MButton = Menu.ImageButton
local MenuingText = {"Returning to Menu in: 3","Returning to Menu in: 2","Returning to Menu in: 1"}
local Info = Selected.Value
local EnabledMenu = function()
MButton.Active = false
Menu.TextLabel.Visible = true
for i,v in pairs(MenuingText) do
Menu.TextLabel.Text = (v)
wait(1)
end
end
local CoverVis = function()
local TweenService = game:GetService("TweenService")
TweenService:Create(Cover,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),{BackgroundTransparency = 0}):Play()
wait(1)
end
local CoverDis = function()
local TweenService = game:GetService("TweenService")
TweenService:Create(Cover,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),{BackgroundTransparency = 1}):Play()
wait(1)
end
MButton.MouseButton1Click:Connect(function()
if MButton.Active == false then return end
EnabledMenu()
CoverVis()
MButton.Visible = false
MenuFrame.Visible = true
MButton.Active = true
Menu.TextLabel.Visible = false
local Event = game.ReplicatedStorage:WaitForChild("Despawn")
Event:FireServer()
wait(2)
CoverDis()
end)
Play.MouseButton1Click:Connect(function()
local CreatureSelected = Selected.Value
local selectedCreature = morphs:FindFirstChild(CreatureSelected)
CoverVis()
MButton.Visible = true
MenuFrame.Visible = false
Play.Visible = false
Desc.Text = "???"
Event:FireServer()
wait(2)
event:FireServer(selectedCreature)
CoverDis()
end)
--TweenService:Create(Cover,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),{BackgroundTransparency = 0}):Play()
Here’s it ingame
https://gyazo.com/b131a010f033fa43cec133f4e23682f4
https://gyazo.com/9dce58b367ebb52c8ac7720f948a3816
I will be adding descriptions maybe later at the information tab, I want the models picture to appear here though if possible