i am making an SCP game and i am trying to make SCP 173 heres the script:
local RunService = game:GetService("RunService")
local npc = workspace.NPC
local character = game.Players.LocalPlayer.Character
RunService.RenderStepped:Connect(function()
local npcToCharacter = npc.Head.CFrame.LookVector
local npcLook = (character.Head.Position - npc.Head.Position).Unit
local dotProduct = npcToCharacter:Dot(npcLook)
print(dotProduct)
if dotProduct > .5 then
workspace.NPC.Follow.Disabled = false
workspace.Baseplate.BrickColor = BrickColor.new("Black")
else
workspace.NPC.Follow.Disabled = true
workspace.Baseplate.BrickColor = BrickColor.new("Baby blue")
end
end)
the script is from https://www.youtube.com/watch?v=BUwAcW_18Ws and modified by me I already put workspace.NPC.Follow.Disabled = true but disabled is still false when running the game.Help appreciated!

4 comments
im pretty sure this is a local script, this is a local script right? if it is, then you cant access server scripts and change them
then how do i make them can access server tho?
is it remote event
me wondering why people are not sure if this is a local script. "LocalPlayer" "RenderStepped" l o l, this question has already been answered so thats y this is useless