Why do these controls break when I join my game on a REAL server

After tampering some bit with other features of the game there’s a chance for this error not to happen. It shouldn’t happen at all, though.

Only when I join a REAL server, WASD, and space and arrow keys neither move my character. Literally quite literally nothing not a singular thing happens when l press wasd, space, or use the arrow keys. ALL other people that join experienced this problem

idk where to start with this

NO, my player isn’t anchored.

the walkspeeds and jumheights are double checked and completely correct.

pressing the navigational key \ also does nothing, I can move perfectIy fine in local servers and in studio

Do you have any scripts or changed any player properties inside of studio, or anywhere else?

If you would like, please reply with any change you made into your game that affects player movement or some Service’s property such as Workspace, StarterPlayer etc.

That would help find the issue quicker!

yes there’s scripts changing humanoid properties only but using a debugger the propelrties are the same as they should be.

this only happens in roblox real time servers not local studio serves or testing in studio which makes it weirder.

It does sound weird that’s true, but it could be that you’re using the RunService:IsStudio() method which would only run (or not) if a user is inside the studio.

Please reply with the specified script below so we can have a look at it together.

well I never ever use these in my whole game, except plugins of course but that’s only plugins.

this is the only script taht affects walkspeed and jumpheight, but even then the values seem to be OK on the server and client.

--// Variables

local Player = game.Players.LocalPlayer

local Character = script.Parent
local Humanoid:Humanoid = Character:WaitForChild("Humanoid")
local Animator:Animator = Humanoid:WaitForChild("Animator")

local SpeedReductions = Character:WaitForChild("SpeedReductions")

local Root:Part = Character:WaitForChild("HumanoidRootPart")

local UIS = game:GetService("UserInputService")
local StarterPlayer = game:GetService("StarterPlayer")

local CurrentlyCrawling = false

local OrginalJumpHeight = StarterPlayer.CharacterJumpHeight
local OrginalWalkSpeed = StarterPlayer.CharacterWalkSpeed

local TableAnimationTracks = {
	["Crawl"] = Animator:LoadAnimation(script.Crawl)
}


--// Functions

local function Crouch(bool:boolean)
	
end

local function Crawl(bool:boolean)
	if bool then
		TableAnimationTracks.Crawl:Play()
		SpeedReductions.Movement0.Value = 4
		Humanoid.JumpHeight = 0
		Humanoid.CameraOffset = Vector3.new(0, -3, -1.8)
	else
		TableAnimationTracks.Crawl:Stop()
		SpeedReductions.Movement0.Value = 0
		Humanoid.JumpHeight = OrginalJumpHeight
		Humanoid.CameraOffset = Vector3.new(0, 0, 0)
	end
	
	CurrentlyCrawling = bool
end


--// Script

if Character.Name~=Player.Name then
	script:Destroy()
end

Root.CanCollide = false
Root.CanQuery = false

UIS.InputBegan:Connect(function(k, g)
	if g==false then
		if k.KeyCode==Enum.KeyCode.C then
			Crawl(not CurrentlyCrawling)
		end
		if k.KeyCode==Enum.KeyCode.F then
			game.ReplicatedStorage.Main:FireServer({Action = "Flashlight"})
		end
	end
end)

game:GetService("RunService").RenderStepped:Connect(function()
	TableAnimationTracks.Crawl:AdjustSpeed(Root.AssemblyLinearVelocity.Magnitude/5)
	
	SpeedReductions.Barbed0.Value = 0
	for _,v in workspace:GetPartBoundsInBox(Root.CFrame, Root.Size*2) do
		if v:HasTag("BarbedWire") then
			SpeedReductions.Barbed0.Value = 6
		end
	end
	
	Humanoid.WalkSpeed = OrginalWalkSpeed
	for x, Value in SpeedReductions:GetChildren() do
		if Value:IsA("NumberValue") then
			Humanoid.WalkSpeed-=Value.Value
		end
	end
end)

every value in speedrecustions is 0, ressetting does not fix the issue. This is a localscript in startercharacterscripts

the fact that the \ key doesn’t work either is also more confusing.

My first guess would be trying to run the script and seeing if this part of the script does anything:

but then you said that every value is 0, okay.

My next step would be what plugins you have installed. After looking at some posts, I saw that plugins may cause malicious/unwanted behavior and since you mentioned that you use plugins, this might be one of the issues causing this.

I tried playing with your script (obviously without utilizing any of the animations or properties, since I don’t own them) and could not find any game-breaking behavior. To note, “\” doesn’t work on my Studio Testing either.

I’m talking in realtime roblox servers.

all of my plugins seem legit and I only have popular ones that I need. This also hasn’t happened before so I know it’s something in the game but I’m not sure what.

My game does destroy the character then load it after some time but even then this shouldn’t be happening, and it’s only happening on roblox servers.

Could you possibly turn on Team Create (if you don’t have it already) and try on a Team Test server? Does the issue happen there?

No the error did not happen on a TC server.

I was able to do a workaround which I’ll be using for now.

local Player = game.Players.LocalPlayer
local Fixing = false

local function Fix()
	if Fixing then
		return
	end
	Fixing = true
	local Loader:LocalScript = script.Parent:WaitForChild("PlayerScriptsLoader")

	Loader.Disabled = true

	task.wait(.5)

	local Module = script.Parent:WaitForChild("PlayerModule")
	local Backup = Module:Clone()
	Module:Destroy()

	task.wait(.5)

	Backup.Parent = script.Parent
	Loader.Disabled = false
	Fixing = false
end

Fix()

Player.CharacterAppearanceLoaded:Connect(function()
	Fix()
end)

Basically I am refreshing the player module, and so far this has been working.

Actually no. This is not a good workaround.

But I did find the actual solution. In one of my scripts, when the player loaded in, the character would be destroyed. I think this caused the player module to break. So instead I put the player in a box, which is less prone to errors and doesn’t cause my controls to break.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.