I have this script in workspace that is supposed to do stuff if the player is using a TouchEnabled Device. As an example, it's supposed to change the BrickColor of a part to green if they are on one.
For some reason, the Part turns Red, even if I play the game on my phone. There are no errors in output.
What could the problem be?
This is the script:
local Mob = game.ServerStorage:WaitForChild("Mobile") local MobP = game.Workspace:WaitForChild("MobPart") game.Players.PlayerAdded:connect(function(player) wait(4) print("Player Joined") if game:GetService("UserInputService").TouchEnabled == true then print("Player is on a touch device") MobP.BrickColor = BrickColor.Green() else print("not on touch device") MobP.BrickColor = BrickColor.Red() end end)