Hello, I need some help with this LocalScript inside a BillboardGui to change the Parent's (ImageButton) Image depending on what device the player is on. There are no errors, and nothing happens.
local uis = game:GetService('UserInputService')
local mobile = uis.TouchEnabled
local console = uis.GamepadEnabled
local pc = not (mobile or console)
if mobile then
script.Parent.Image = ("rbxassetid://995969403")
script.Parent.MouseButton1Down:Connect(function(Player)
script.Parent.Image = ("rbxassetid://995969938")
end)
script.Parent.MouseButton1Up:Connect(function(Player)
script.Parent.Image = ("rbxassetid://995969403")
end)
else
if console then
script.Parent.Image = ("rbxassetid://995987760")
script.Parent.MouseButton1Down:Connect(function(Player)
script.Parent.Image = ("rbxassetid://995988254")
end)
script.Parent.MouseButton1Up:Connect(function(Player)
script.Parent.Image = ("rbxassetid://995987760")
end)
else
if pc then
script.Parent.Image = ("rbxassetid://995986660")
script.Parent.MouseButton1Down:Connect(function(Player)
script.Parent.Image = ("rbxassetid://995987092")
end)
script.Parent.MouseButton1Up:Connect(function(Player)
script.Parent.Image = ("rbxassetid://995986660")
end)
end
end

2 comments
Read my bio.
Your bio has nothing to do with this problem. And that comment is getting dead annoying to read on every question I see.