Hi, I am making a game and ran into a werid scripting error, it makes no sense because its telling me that Value is not a vaild member of player, even though I don't have player.Value in there, I even tried removing value from it and it still said it, Here's part of the code
The localscript
local RE = game:GetService("ReplicatedStorage").BuyItem local button = script.Parent local price = script.Parent.Price local player = script.Parent.Parent.Parent.Parent.Parent button.MouseButton1Click:Connect(function() RE:FireServer(player, price) end)
Part of the script (if player.leaderstats.Views.Value >= price.Value then is the part with the error)
game:GetService("ReplicatedStorage"):WaitForChild("BuyItem").OnServerEvent:Connect(function(player, price) if player.leaderstats.Views.Value >= price.Value then player.ViewsEveryClick.Value = player.ViewsEveryClick.Value + 5 player.leaderstats.Views.Value = player.leaderstats.Views.Value - price.Value end end)
Ok so I tried removing the if statement giving the error and I got the error somewhere else
Closed as Non-Descriptive by Mr_Unlucky, SuperSamyGamer, and Leamir
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?