So I have a script that handles a click and also a function that checks the device the user is on but like none of them are working and I have no clue why because they were working perfectly before.
I literally call both of them.
UNIVERSAL MOUSE CLICK CODE
function X:Click()
self.MouseButton1Click:Connect(function()
local MMSounds = game.Workspace.MMSounds
local Click = MMSounds.Click
Click:Play()
if self.Name == "startGame" then
StartGame()
end
end)
end
CHECK DEVICE CODE
local function CheckDevice()
if isMobile then
print(plr.Name.. " is on Mobile!")
Key.Visible = false
PCText.Visible = false
MobileText.Visible = true
bottom.Visible = true
top.Visible = true
MainModule:Tween(Mobile, 2, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1, true, {ImageTransparency = 1})
Mobile.Visible = true
elseif isKeyboard then
print(plr.Name.. "is on PC!")
Mobile.Visible = false
MobileText.Visible = false
PCText.Visible = true
bottom.Visible = true
top.Visible = true
MainModule:Tween(Key, 2, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1, true, {ImageTransparency = 1})
Key.Visible = true
FPressed()
end
end
