How could I improve my Undertale GUI so everything is fine? Remembering it is an Undertale GUI, who knows about the topic please give me thoughts!
Also I am witnessing with a problem, sometimes the sound doesn’t play when it needs to! As you can see on my video, some parts when mouse is hovered, the sound doesn’t play!
May I get the script that plays the sound?
--[[VARIABLES]]--
local Frame = script.Parent
local information = script.Parent.Information
local star = information.SaveStar
local image1,image2,image3,image4 = Frame.Bone1,Frame.Bone2,Frame.Bone3,Frame.Bone4
local textlabel = script.Parent.Stats.SansName --change
local tween = game:GetService("TweenService")
local thread = task.spawn
local Childrens = information:GetChildren()
local offset = 0
local sound = game:GetService("ReplicatedStorage").Selection
--[[TABLES]]--
local images = {image1,image2,image3,image4}
--[[FUNCTIONS]]--
local function PlayTween(tween : Tween)
tween:Play()
end
local function RotateImage()
local tweenRotate = TweenInfo.new(.6, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
while task.wait(math.random(3,10)) do
local random = images[math.random(1,#images)]
local rotate = tween:Create(random,tweenRotate,{Rotation = random.Rotation + 360})
PlayTween(rotate)
end
end
local function RotateStar()
local rotateStar = tween:Create(star,TweenInfo.new(2.25,Enum.EasingStyle.Linear,Enum.EasingDirection.In,-1),{Rotation = star.Rotation + 360})
PlayTween(rotateStar)
end
local function Tween(object : Instance, Position : UDim2)
local info = TweenInfo.new(.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, -1, true, 0)
local property = {
Position = Position
}
local pos = tween:Create(object,info,property)
PlayTween(pos)
end
local function PlaySound(sound : Sound) -- Here is the sound function
local clone = sound:Clone()
clone.Parent = Frame
clone:Play()
game.Debris:AddItem(clone,clone.TimeLength)
end
local function MouseEnter(object : Instance,color : Color3)
object.BorderColor3 = color
PlaySound(sound) -- Here is where the sound function is called.
end
local function MouseLeave(object : Instance,original : Color3)
object.BorderColor3 = original
end
for _,v in pairs(Childrens) do
if v:IsA("TextButton") then
local fromRGB = Color3.fromRGB
local color = fromRGB(255,255,0)
local original = v.BorderColor3
v.MouseEnter:Connect(function()
MouseEnter(v,color)
end)
v.MouseLeave:Connect(function()
MouseLeave(v,original)
end)
end
end
--[[Threads]]--
thread(RotateImage)
thread(RotateStar)
--[[FunctionCalls]]--
local core1 = (Tween)(image1,UDim2.new(0.015,offset,0.1,offset))
local core2 = (Tween)(image2,UDim2.new(0.985,offset,0.9,offset))
local core3 = (Tween)(image3,UDim2.new(0.05,offset,0.045,offset))
local core4 = (Tween)(image4,UDim2.new(0.95,offset,0.96,offset))
Also how would I improve my gui? Adding effects?
im not really an expert but i guess i could tell you what to improve
everything seems alr but in the frame where the buttons is like the stats theres some empty space like you could maybe put some art there, you could also make a tween where if the mouse is hovered into those buttons it will largen so its clear what you are selecting to player though it might be a problem for mobile players since they play in mobile
again everything is alright and fits the undertale vibe but if you want like its OPTIONAL, is too fill some empty space
for me i dont really like an empty space especially if its large so again its optional you could add more design because you very much already creative!
though thats all i could think off. if my suggestion is good thank me later
Thank you! I made some fixes that should make it fine
Mark as solution so every knows that the problem has fixed.
The topic doesn’t have a specific solution, since it is a feedback and answers on how to improve though!
Oh I thought that it’s a help not a feedback thank you.