#datastore issues

27 messages · Page 1 of 1 (latest)

honest sable
#

any errors when you join the game?

paper bane
#

no

honest sable
#

Ok so

#

not sure if this is correct as im an amateur scripter but you have got the value from the data store by using GetAsync

#

but you havent set it using SetAsync

paper bane
#

ive got a function for that

#

which is using setasync and printing any errors if found

honest sable
#

ah yes i see that now

#

you do have a save function but i cannot see when you are calling it when the player leaves

paper bane
#

under playerData

honest sable
#

what does dowodStworz mean

paper bane
#

it's the ui

#

if youre talking about dowodstworz:remove

honest sable
#

no you have this line: remoteEvent.OnServerEvent:Connect(function(player, imie, nazwisko, wiek)

#

and the remote event is here

#

local remoteEvent = game.ReplicatedStorage:WaitForChild("dowodStworz")

#

So im assuming this function wants to be called when the player leaves

#

its probably better to use Players.PlayerRemoving:Connect(function()

#

it might work if it doesnt ping me or dm me

paper bane
# honest sable its probably better to use Players.PlayerRemoving:Connect(function()
local imieTextBox = script.Parent.Parent.imie
local nazwiskoTextBox = script.Parent.Parent.nazwisko
local wiekTextBox = script.Parent.Parent.wiek
local potwierdzButton = script.Parent.Parent.potwierdz

local remoteEvent = game.ReplicatedStorage:WaitForChild("dowodStworz")

local function check(s)
    return s:match("^%s*(.-)%s*$")
end

potwierdzButton.MouseButton1Click:Connect(function()
    local imie = check(imieTextBox.Text)
    local nazwisko = check(nazwiskoTextBox.Text)
    local wiek = check(wiekTextBox.Text)
    remoteEvent:FireServer(imie, nazwisko, wiek)
end)

this is my localscript that fires the remote

#

basically if guibutton is clicked it fires the remote to get the textbox text to compare them to the ones in the tables

#

so i cant use playerremoving

honest sable
#

ok

#

hmm sorry not sure what the issue is

#

lemme ask my friend hes a better dev then me

#

@uncut quartz

#

??