so i have been scripting for 2 weeks and my tool isnt working in game but it is in studio also can i get help adding animation?
LeaderStats Code Its Supposed To Save Data This is normal script
local DataStoreService = game:GetService("DataStoreService")
local myDataStore = DataStoreService:GetDataStore("myDataStore")
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local Muscle = Instance.new("IntValue")
Muscle.Name = "Muscle"
Muscle.Parent = leaderstats
local data
local success, errormessage = pcall(function()
myDataStore:GetAsyn(player.UserId.. "-Muscle")
end)
if success then
Muscle.Value = data
else
print("There Was A Error Saving Your Data")
warn(errormessage)
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local success, errormessage = pcall(function()
myDataStore:SetAsync(player.UserId.."-Muscle",player.leaderstats.Muscle.Value)
end)
if success then
print("Player Data Is Saved :D")
else
print("There Was An Error Saving Data")
warn(errormessage)
end
end)
and here is my tools code this is local script
script.Parent.Activated:Connect(function()
local plr = game.Players:FindFirstChild(script.Parent.Parent.Name)
if plr then
local stats = plr:WaitForChild("leaderstats")
local Muscle = stats:WaitForChild("Muscle")
Muscle.Value = Muscle.Value + 1
end
end)

3 comments
what do u mean?
Changes from the client cant be detected on a server script, theyre saying to either disable Filtering Enabled (a property of workspace) or use Remote events
You can't disable filtering enabled as it's forced upon all games, disabling it wouldn't do anything.