Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

DataReady is never true?

script.Parent.MouseButton1Click:connect(function()
	if game.Players.LocalPlayer.DataReady == true then
		local house = game.ReplicatedStorage.AverageHouse:Clone()
		--Miscellaneous code
		game.Players.LocalPlayer:SaveInstance("House", house)
		game.Players.LocalPlayer.PlayerGui.HouseGUI:Destroy()
	else print("wait")
	end
end)

This script is in a button. When I click the button, a house model should show up in workspace and be saved via data persistence. However, it never works because DataReady never becomes true! What's going on here?

1 answer

If you are trying to use "DataReady" with a guest (AKA a user with a "UserId" less then 0) then that user's "DataReady" property will never equal true!

2 comments

0

Well, that and he never waits for DataReady to become ready, he goes straight into the if then statement. Also, I believe DataReady works on Guests, it just returns nil keys and values (though I could be wrong).

0

Last time I checked, WaitForDataReady was broken and I had to resort to a repeat loop until DataReady was true.

This discussion is preserved as it was. New answers, comments, and votes are closed.