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

Getting a nil value when trying set ControllerService to a variable?

Alright, I have a local script placed in starter player scripts, which is post to remove the controls of the character (then an animation plays)

But before the script can continue it get stucks on this line.

local ControllerService = game:GetService("ControllerService")
local Controls = ControllerService:FindFirstChildOfClass("HumanoidController")

I get an error saying " attempt to index local 'ControllerService' (a nil value)"

I have no clue on how to fix this.

1 answer

The ControllerService is marked as internal. Afaik you cannot obtain a reference to it in any way.

1 comment

0

How would I go about removing the control of the player then?

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