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)

4 comments

0

What script is this? Also, use game.Players.LocalPlayer.CharacterAdded:Wait()

0

@hiimgoodpack CharacterControls

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.

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).