Im trying to disable the player’s controls for a couple of seconds but it keeps saying that playerscript doesnt exist, and yes It is a local script.
local:
remote.OnClientEvent:Connect(function(status, data)
local vplr = data[1]
local PlayerModule = require(vplr.PlayerScripts:WaitForChild("PlayerModule"))
local Controls = PlayerModule:GetControls()
if status:lower() == "enable" then
Controls:Enable()
elseif status:lower() == "disable" then
Controls:Disable()
end
end)
server:
stop = function(character,vcharacter)
warn("Stop Called")
local player = game.Players:GetPlayerFromCharacter(character)
local vplr
if game.Players:FindFirstChild(vcharacter.Name) then
vplr = game.Players:GetPlayerFromCharacter(vcharacter)
end
if vplr then
remote:FireClient(player, "Disable", {vplr})
wait(4)
remote:FireClient(player, "Enable", {vplr})
end
end