-
I’m trying to make a UI button that changes the players platform when touched(for example a PC player hit the mobile button and then had mobile controls).
-
I don’t know if this is possible? I don’t know any API references close to it or such.
-
I haven’t looked on the DevHub as I don’t know the API name for platforms. I don’t need a whole script, API references or tutorials would work fine.
iirc the Join.ashx
request specifies all information related to your username, operating system, etc. before your game authentication ticket is generated–however there is a data signature on this request now so it’s not as easy as modifying the request anymore.
I probably should’ve read the post description.
You should be able to modify the player’s PlayerScripts.PlayerModule.ControlModule
.
Check out ControlModule.new
. It has reference to the construction of a mobile player’s TouchGui
function ControlModule.new()
local self = setmetatable({},ControlModule)
-- The Modules above are used to construct controller instances as-needed, and this
-- table is a map from Module to the instance created from it
self.controllers = {}
self.activeControlModule = nil -- Used to prevent unnecessarily expensive checks on each input event
self.activeController = nil
self.touchJumpController = nil
self.moveFunction = Players.LocalPlayer.Move
self.humanoid = nil
self.lastInputType = Enum.UserInputType.None
-- For Roblox self.vehicleController
self.humanoidSeatedConn = nil
self.vehicleController = nil
self.touchControlFrame = nil
self.vehicleController = VehicleController.new(CONTROL_ACTION_PRIORITY)
Players.LocalPlayer.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char) end)
Players.LocalPlayer.CharacterRemoving:Connect(function(char) self:OnCharacterRemoving(char) end)
if Players.LocalPlayer.Character then
self:OnCharacterAdded(Players.LocalPlayer.Character)
end
RunService:BindToRenderStep("ControlScriptRenderstep", Enum.RenderPriority.Input.Value, function(dt)
self:OnRenderStepped(dt)
end)
UserInputService.LastInputTypeChanged:Connect(function(newLastInputType)
self:OnLastInputTypeChanged(newLastInputType)
end)
UserGameSettings:GetPropertyChangedSignal("TouchMovementMode"):Connect(function()
self:OnTouchMovementModeChange()
end)
Players.LocalPlayer:GetPropertyChangedSignal("DevTouchMovementMode"):Connect(function()
self:OnTouchMovementModeChange()
end)
UserGameSettings:GetPropertyChangedSignal("ComputerMovementMode"):Connect(function()
self:OnComputerMovementModeChange()
end)
Players.LocalPlayer:GetPropertyChangedSignal("DevComputerMovementMode"):Connect(function()
self:OnComputerMovementModeChange()
end)
--[[ Touch Device UI ]]--
self.playerGui = nil
self.touchGui = nil
self.playerGuiAddedConn = nil
if UserInputService.TouchEnabled then
self.playerGui = Players.LocalPlayer:FindFirstChildOfClass("PlayerGui")
if self.playerGui then
self:CreateTouchGuiContainer()
self:OnLastInputTypeChanged(UserInputService:GetLastInputType())
else
self.playerGuiAddedConn = Players.LocalPlayer.ChildAdded:Connect(function(child)
if child:IsA("PlayerGui") then
self.playerGui = child
self:CreateTouchGuiContainer()
self.playerGuiAddedConn:Disconnect()
self.playerGuiAddedConn = nil
self:OnLastInputTypeChanged(UserInputService:GetLastInputType())
end
end)
end
else
self:OnLastInputTypeChanged(UserInputService:GetLastInputType())
end
return self
end
Never heard of this before, will check it out though.