Roblox bug - "ContextActionService:BindAction can only be called from a local script"

I’m trying to make my game but I run into this issue where whenever the game starts, it shows the error shown in the title above.

I used CMD + Shift + S(I’m on MacOS) to enable to the search panel for scripts, and with the keyword “ContextActionService”, I found nothing on the server.

Any ideas?

ContextActionService, along with UserInputService only work in local scripts as in the title, because it deals with client-side inputs. I hope this helps!

The server is clear of anything regarding user-input.

Search Panel:

Can you share the entire script? Roblox is pretty nit-picky with how stuff works in scripts.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remotes = ReplicatedStorage.Remotes

local PlayersArmOrder = {}
local Projectile = require(script.Projectile)

local function Order(player)
	if PlayersArmOrder[player] == nil then PlayersArmOrder[player] = "Right Arm" end
	if PlayersArmOrder[player] == "Right Arm" then
		PlayersArmOrder[player] = "Left Arm"
	elseif PlayersArmOrder[player] == "Left Arm" then
		PlayersArmOrder[player] = "Right Arm"
	end
	return PlayersArmOrder[player]
end

Remotes.ToServer.OnServerEvent:Connect(function(player,signal,pos)
	if signal == "TriggerPoop" then
		Projectile.new(player,pos,Order(player)):Init()
	end
end)

I don’t think this issue really revolves around scripts and its just a bug, I just can’t file a bug report.

I’d also like to mention if I unenable all the scripts I’ve created, it still shows this error.

1 Like

By the way this error came from plugins. I thought it was breaking my game but it wasn’t, it was another line of code.

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