Answered by
5 years ago Edited 5 years ago
I helped you in community chat, the problem is that you cannot disable module scripts, your expected solution was to destroy the module,
1 | game.ReplicatedStorage.GravityController:Destroy() |
There is another way, you can just parent it somewhere else so that other scripts can't find the module. That might result in an error so make sure to add WaitForChild to the scripts requiring the module.
Make sure the localscript is in startergui.
If this helps remember to accept the answer.
01 | local Sand = game.Workspace:WaitForChild( "Sand" ) |
03 | Sand.Touched:Connect( function (hit) |
04 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
05 | if Debounce = = false then Debounce = true |
06 | game.ReplicatedStorage.GravityController:Destroy() |
07 | print ( "Module successfully destroyed" ) |