Hello there! I am trying to find out what is wrong with my rewarder script wich is in SSS and its supposed to give you 750 strength (a number value) but it does not work when you type a code in called “TEST” it says the strength code is true but it does not give the actual strength here is the script!
script.Parent.Textinput.FocusLost:Connect(function()
print(“Focus lost”)
if script.Parent.Textinput.Text == “TEST” then
print(“StrengthCode true”)
if player.StrengthCode.Value == false then
print(“StrengthCode is false”)
local Strength = 750
game.ReplicatedStorage.Rewarder:FireServer(Strength)
player.StrengthCode.Value = true
end
end
end)
if player.StrengthCode == false then
print(“The code is invalid!”)
end
I changed the LocalScript to false:
local player = game.Players.LocalPlayer
script.Parent.Textinput.FocusLost:Connect(function()
print(“Focus lost”)
if script.Parent.Textinput.Text == “TEST” then
print(“StrengthCode true”)
if player.StrengthCode.Value == false then
print(“StrengthCode is false”)
local Strength = 750
game.ReplicatedStorage.Rewarder:FireServer(Strength)
—> player.StrengthCode.Value = false
end