Hey.
I was bored and decided to make a Login System, weird thing is: Password isn’t getting changed.
Server script:
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SEND_NEW_PASSWORD_DATA = ReplicatedStorage.LoginSystem.RemoteEvents:FindFirstChild("SEND_NEW_PASSWORD_DATA")
Players.PlayerAdded:Connect(function(Player)
local LoginSystem = Instance.new("Folder", Player)
LoginSystem.Name = "LoginSystem"
local PasswordFolder = Instance.new("Folder", LoginSystem)
PasswordFolder.Name = "PasswordFolder"
local PlayerCheck = Instance.new("Folder", LoginSystem)
PlayerCheck.Name = "PlayerCheck"
local Password = Instance.new("StringValue", PasswordFolder)
Password.Name = "Password"
Password.Value = ""
local newPlayer = Instance.new("BoolValue", PlayerCheck)
newPlayer.Name = "newPlayer"
newPlayer.Value = true
SEND_NEW_PASSWORD_DATA.OnServerEvent:Connect(function(plr, data)
local newPlayerData = plr.LoginSystem.PlayerCheck.newPlayer
local passwordData = plr.LoginSystem.PasswordFolder.Password
newPlayerData.Value = false
passwordData.Value = data.Text --error line
print(data)
end)
end)
Client script:
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvents = ReplicatedStorage.LoginSystem.RemoteEvents
local SEND_NEW_PASSWORD_DATA = RemoteEvents:FindFirstChild("SEND_NEW_PASSWORD_DATA")
local LoginUI = script.Parent
local LoginFrame = LoginUI.LoginFrame
local TitleLabel = LoginFrame.TitleLabel
local NewPlayerFrame = LoginFrame.NewPlayerFrame
local CreateLogin = NewPlayerFrame.CreateLogin
local NewPasswordInput = NewPlayerFrame.NewPasswordInput
local PasswordFrame = LoginFrame.PasswordFrame
local NameLabel = PasswordFrame.NameLabel
local PasswordInput = PasswordFrame.PasswordInput
local IncorrectPasswordLabel = PasswordFrame.IncorrectPasswordLabel
local Login = PasswordFrame.LoginButton
CreateLogin.MouseButton1Click:Connect(function()
local data = NewPasswordInput.Text
print(data)
SEND_NEW_PASSWORD_DATA:FireServer(Player, data)
NewPlayerFrame.Visible = false
PasswordFrame.Visible = true
end)


