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

Player not moving when game published but is moving when played through the studio?

Asked by
joeldes 201 Moderation Voter
6 years ago
Edited 6 years ago

I am having a problem that I can't solve for some reason. Basically when I play my game in the studio my character movement (which is basically the player following where ever the mouse is located) works perfectly. But as soon as I publish or go into team test nothing works at all.

Please take a look at my script and tell me what is wrong.

print("Intalizing Character Controls")

local mouse = game.Players.LocalPlayer:GetMouse()

mouse.Move:Connect(function()
        game.Players.LocalPlayer.Character.Humanoid:MoveTo(mouse.Hit.p)
end)
0
What script is this? Also, use game.Players.LocalPlayer.CharacterAdded:Wait() hiimgoodpack 2009 — 6y
0
@hiimgoodpack CharacterControls joeldes 201 — 6y
0
You should use more "print" statements to figure out what the values of things are that aren't working. Also, if you're in Online mode, you can press F9 for the developer console. You can also do an online-like local test right in Roblox studio (not by pressing F5, but by going to Test > Start Server), in case you weren't aware. chess123mate 5873 — 6y
0
If by "nothing works at all" you mean not even line 1 prints, then you have placed the script in the wrong place and/or used the wrong type of script (ex a Script instead of a LocalScript). chess123mate 5873 — 6y

Answer this question