So basically I thought that I had some knowledge on scripting, I am creating a remake of Project Pokemon, (no actual pokemon included, or story) and when I attempted to open the menu in mobile mode it just does nothing.
--UDim.new(1,-121,0, 0)
--TweenPosition ( UDim2 endPosition, EasingDirection easingDirection = Out, EasingStyle easingStyle = Quad, float time = 1, bool override = false, Function callback = nil )
repeat wait() until game.Players.LocalPlayer.PlayerGui and _G.ready and _G.MovesReady and _G.SpritesReady and _G.TablesReady
wait(3)
p = game.Players.LocalPlayer
repeat wait() until p.Character
local speech = p.PlayerGui.DialogTalk.TalkB.Talk
function scrolltext(text,saving)
speech.Text = ""
speech.Visible = true
speech.Parent.Visible = true
speech.Parent.Next.Visible = false
p.Character.Humanoid.WalkSpeed = 0
for i = 1, #text,3 do
speech.Text = string.sub(text,1,i)
speech.DropShadow.Text = speech.Text
wait()
end
speech.Text = text
speech.DropShadow.Text = text
wait(.9)
speech.Visible = false
speech.Parent.Visible = false
speech.Parent.Next.Visible = true
p.Character.Humanoid.WalkSpeed = 0
end
savefailure = nil
game.ReplicatedStorage.REvents.Internal.saveError.OnClientEvent:connect(function(string)
savefailure = string
end)
greatOlTable = {
["Pokedex"] =
function()
_G.Pokedex()
end,
["Party"] =
function()
if p:FindFirstChild("PokemonParty") then
if #p:FindFirstChild("PokemonParty"):GetChildren()> 0 then
p.PlayerGui.Main.BlackScreen.Visible = true
for i,v in ipairs(p.PlayerGui.Main.BlackScreen:GetChildren()) do
v.Visible = false
end
_G.PartyOverworld()
elseif (speech.Text == "" or speech.Visible == false) then
script.Parent.Main.Menu.Visible = false
scrolltext("You don't have any Pokemon! Go to Prof. Oak!")
script.Parent.Main.Menu.Visible = true
end
end
end,
["Trainer"] =
function()
_G.TrainerCard(p)
end,
["Bag"] =
function()
_G.UpdateBag()
p.PlayerGui.Main.BlackScreen.Visible = true
p.PlayerGui.Main.Backpack.Visible = true
end,
["Powers"] =
function()
p.PlayerGui.Main.BlackScreen.Visible = true
_G.PokeBoosters()
end
,
["Save"] =
function()
if #game.Players.LocalPlayer.PokemonParty:GetChildren() > 0 then
script.Parent.Main.Menu.Save.Visible = false
script.Parent.Main.Menu.Visible = false
scrolltext("Saving... Do not close the game until it says \"Save successful\".")
speech.Parent.Next.Visible = false
speech.Text = "Currently saving... this may take some time..."
speech.DropShadow.Text = speech.Text
speech.Visible = true
speech.Parent.Visible = true
p.Character.Humanoid.WalkSpeed = 0
local savesuccessful = game.ReplicatedStorage.REvents.Internal.Save:InvokeServer()
if savesuccessful == "Worked" then
scrolltext("Save successful.",true)
scrolltext("You can save again in 240 seconds.",true)
script.Parent.Main.Menu.Visible = true
p.Character.Humanoid.WalkSpeed = 0
speech.Parent.Next.Visible = true
coroutine.resume(coroutine.create(function() wait(250) script.Parent.Main.Menu.Save.Visible = true
end))
else
scrolltext("Error. Your save did not save correctly. This is probably due to ROBLOX errors.")
scrolltext("Error: "..savesuccessful)
scrolltext("Wait 10 seconds and try to save again.")
scrolltext("You must do this to ensure that your data is saved without any problems.")
wait(10)
script.Parent.Main.Menu.Save.Visible = true
end
elseif #game.Players.LocalPlayer.PokemonParty:GetChildren() == 0 then
scrolltext("You cannot save with 0 Pokemon in your party.")
end
end,
["Mystery"] =
function()
if p:FindFirstChild("Badges") and #p.Badges:GetChildren() > 0 then
_G.MysteryGift()
else
scrolltext("You need 1 badge to use this feature.")
end
end
}
local colors = {}
char = p.Character
gui = p.PlayerGui
main = gui.Main
battle = gui.Main.BlackScreen
menu = gui.Main.Menu
button = menu.Scroll
local Sound = Instance.new("Sound",script)
Sound.SoundId = "http://www.roblox.com/asset/?id=325340000"
battle.Changed:connect(function(property)
if property == "Visible" then
if button.Title.Text == "Menu <" then
button.Title.Text = "Menu >"
button.Title.DropShadow.Text = button.Title.Text
menu.Position = UDim2.new(-0.1, 0,0.2, 0)
end
menu.Visible = not battle.Visible
end
end)
button.MouseButton1Click:connect(function()
if (not main:FindFirstChild("ContinueScreen")) or (main:FindFirstChild("ContinueScreen") and main.ContinueScreen.Visible == false) then
if battle.Parent == nil then
menu.Position = UDim2.new(0, 0,0.2, 0)
elseif battle.Visible == false then
Sound.Pitch = 1
Sound:Play()
if button.Title.Text == "Menu >" then
button.Title.Text = "Menu <"
button.Title.DropShadow.Text = button.Title.Text
char.Humanoid.WalkSpeed = 0
menu:TweenPosition(UDim2.new(0, 0,0.2, 0),"Out",'Quad',.25,true)
elseif button.Title.Text == "Menu <" then
Sound.Pitch = 1
Sound:Play()
char.Humanoid.WalkSpeed = 16
button.Title.Text = "Menu >"
button.Title.DropShadow.Text = button.Title.Text
menu:TweenPosition(UDim2.new(-0.1, 0,0.2, 0),"Out","Quad",.25,true)
end
end
end
end)
button.MouseEnter:connect(function()
button.Title.TextColor3 = Color3.new(.5,.5,0)
end)
button.MouseLeave:connect(function()
button.Title.TextColor3 = Color3.new(1,1,0)
end)
for i,v in ipairs(menu:GetChildren()) do
if v:IsA("TextButton") and v.Name ~= "Scroll" then
colors[v] = v.Title.TextColor3
v.MouseButton1Click:connect(function()
Sound.Pitch = 1
Sound:Play()
greatOlTable[v.Name]()
end)
v.MouseEnter:connect(function()
v.Title.TextColor3 = Color3.new( colors[v].r-.5, colors[v].g-.5, colors[v].b-.5)
end)
v.MouseLeave:connect(function()
v.Title.TextColor3 = colors[v]
end)
end
end

1 comment
Have you tried using gui.Activated rather than mousebutton1click?