Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
Edited 5 years ago

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

Log in to vote
0
Answered by
Amiaa16 3227 Moderation Voter Community Moderator
5 years ago

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

0
How would I go about removing the control of the player then? YourMajesty_Kami 1 — 5y
Ad

Answer this question