Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is this the right use of GetPlatform() function?

Asked by
RiotGUI 15
6 years ago

I've been trying to use GetPlatform to know what is the operating device people are using.

Please, I need examples.

local UIS = game:GetService("UserInputService")
for i, v in pairs(game.Players:GetPlayers()) do
UIS.GetPlatform:Connect(function(platform)
if platform.UserInputType == Enum.Platform.Windows then
game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(game.Players[v].Name .. " is using: Windows", "All")
else
print("not windows")

1 answer

Log in to vote
0
Answered by 6 years ago

ive just looked at the dev wiki and by the looks of it you cant use it. it is only used by "core scripts" (core scripts are scripts that roblox made and run on startup) so yeah: https://wiki.roblox.com/index.php?title=API:Class/UserInputService/GetPlatform

Ad

Answer this question