You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
To be able to make local script to be functional on mobile
-
What is the issue? Include screenshots / videos if possible!
The script only works on pc and emulator
and completely ignores it on mobile
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I published the game/experience and it updated it for the pc,
and to test it more i just used a print() in the beginning and in mobile it did not detect it,
is it possible that roblox uses something against exploiters that block local scripts?
1 Like
No, Roblox does not do anything to the local scripts, at least not that I know of.
You, and by extent, Roblox’s default systems, only have total control of the server, the client is the player’s computer, and therefore, they can do whatever they want with enough know-how.
I don’t know what your code looks like, but a print-statement will not show by default in the Roblox Player, you’ll need to open the developer console to see the output window in the Roblox Player, you could have done that, but if you didn’t, that’s where it would print. Also make sure you’re developer console is reading the client and not the server.
can we please see the code?
I dont think we can help you without it
This is the code:
(Its a local script located in StarterPlayerScripts)
local player =
game:GetService("Players").LocalPlayer
local character = player.CharacterAdded:Wait()
print("characterLoaded")
local runService = game:GetService("RunService")
local camera = workspace.CurrentCamera
local controls = require(player.PlayerScripts:FindFirstChild("PlayerModule")):GetControls()
runService.RenderStepped:Connect(function()
print("Are we acctuallly getting here?")
character:PivotTo((CFrame.new(character:GetPivot().Position) * camera.CFrame.Rotation))
end)
Thanks for your time FroDev and Chloric.
Hmm mobile can use the thingy that shows errors prints etc?
Cause this should work fine, when you published the game, after doing it you did go to file > publish game?
This updates the place which you need to do.
Also does in the published game, does the script work for PC? Just making sure
Yes it does work on pc and I put it on roblox to test where I found out it doesnt work on mobile
basically the player is suppose to look at the camera direction