Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

Whenever I run my game, it always says "ContextActionService:BindAction can only be called from a local script". Even if it is a brand-new place, with nothing in it, it says it. I don't really know if it affects the code, but I don't want it there. Does anyone know how to fix it? I tried closing and booting up Roblox Studio, and I even restarted my computer!

2 answers

The problem is you're using a Local Script. You can research the difference between local scripts and server side ones, but the main one is that local scripts only show on the client (player). Too fix this, just use a local script. An important thing to note is that Local Scripts do not work unless they're in StarterPack, StarterGui or StarterPlayerScripts. You can also reference the player as game.Players.LocalPlayer instead.

1 comment

0

to extend to this great answer: think of it like this, LocalScripts run on the player's computer, therefore, anything they do should be endemic to that player.. this is why u need remote(events/functions) to communicate with the server

old but its probably because of a corrupt plugin, try uninstalling it.

This discussion is preserved as it was. New answers, comments, and votes are closed.