✓ Accepted answer
Something could be wrong with the name of players. Try this instead
game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(c)
local v = Instance.new("BoolValue", c)
v.Name = "pistolTouch"
v.Value = false
end)
end)
if that still doesn't work, then you can try adding print functions in to see what functions are messing up
game:GetService("Players").PlayerAdded:Connect(function(plr)
print("Player Joined")
plr.CharacterAdded:Connect(function(c)
print("Character added")
local v = Instance.new("BoolValue", c)
v.Name = "pistolTouch"
v.Value = false
end)
end)
Hoped this helped
2 comments
Because you are having the client create an object that's supposed to be visible by server and everyone else. You can't do that via a LocalScript.
This was a server script, but yellp got me fixed up!