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

Why does this script execute one "step" behind?

Asked by
Uglypoe 557 Donator Moderation Voter
9 years ago

For some reason, my script always executes these "steps" one step behind on Mobile devices. And idea on why this might be happening? I posted relevant coding below. Thanks!

01repeat wait() until game.Players.LocalPlayer.Character ~= nil
02wait()
03currentcell = game.ReplicatedStorage.Move:InvokeServer()
04mouse = game.Players.LocalPlayer:GetMouse()
05 
06active = false
07moving = false
08run = false
09keyboard = false
10touch = false
11if game:GetService("UserInputService").KeyboardEnabled == true then
12keyboard = true
13else
14if game:GetService("UserInputService").TouchEnabled == true then
15touch = true
View all 41 lines...
0
Possible lag on a mobile device? Maybe lua needs a really good cpu to exectute at the right time? Just chucking ideas out. TheDeadlyPanther 2460 — 9y
0
I don't think it's that. It's like when you click on one spot to move to when you first join, it doesn't work. When you click on a second spot, you'll go to the first spot. Third click to second spot. etc. Uglypoe 557 — 9y

Answer this question