DISCALMER: The Title Speaks for itself ^
|
idk what the error is, what came up In the output was,
13:15:28.111 AddCoins is not a valid member of Script "Workspace.MainEvent" - Server - MainEvent:1
13:15:28.112 Stack Begin - Studio
13:15:28.112 Script 'Workspace.MainEvent', Line 1 - Studio - MainEvent:1
13:15:28.112 Stack End - Studio
13:15:51.600 AddCoins is not a valid member of Script "Workspace.MainEvent" - Client - AddCoins:2
13:15:51.606 Stack Begin - Studio
13:15:51.606 Script 'Players.NubblyFry.Backpack.Tin Pot.AddCoins', Line 2 - Studio - AddCoins:2
13:15:51.607 Stack End - Studio
13:15:51.749 AddCoins is not a valid member of Script "Workspace.MainEvent" - Client - AddCoins:2
13:15:51.749 Stack Begin - Studio
13:15:51.750 Script 'Players.NubblyFry.Backpack.Tin Pot.AddCoins', Line 2 - Studio - AddCoins:2
13:15:51.750 Stack End - Studio
13:15:52.266 AddCoins is not a valid member of Script "Workspace.MainEvent" - Client - AddCoins:2
13:15:52.267 Stack Begin - Studio
13:15:52.268 Script 'Players.NubblyFry.Backpack.Tin Pot.AddCoins', Line 2 - Studio - AddCoins:2
13:15:52.268 Stack End - Studio
13:15:52.931 AddCoins is not a valid member of Script "Workspace.MainEvent" - Client - AddCoins:2
13:15:52.932 Stack Begin - Studio
13:15:52.933 Script 'Players.NubblyFry.Backpack.Tin Pot.AddCoins', Line 2 - Studio - AddCoins:2
13:15:52.933 Stack End - Studio
This is very connfusing, heres the script I used below me
leaderstats >>>>
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Value = 0
coins.Parent = stats
local stars = Instance.new("IntValue")
stars.Name = "Stars"
stars.Value = 0
stars.Parent = stats
end)
MainEvent >>>>
script.AddCoins.OnServerEvent:Connect(function(player)
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value +1
end)
AddCoins >>>>
script.Parent.Activated:Connect(function()
game.Workspace.MainEvent.AddCoins:FireServer()
script.Parent.Enabled = false
wait(1)
script.Parent.Enabled = true
end)