"The current thread cannot access 'LodDataService' (lacking capability RobloxEngine)"

Trying to set a gui text to a leaderstats value but keep getting the error: “The current thread cannot access ‘LodDataService’ (lacking capability RobloxEngine)”. Tried a few things but to no avail. I’ve noticed a few others having similar issues.

local cashAmount = script.Parent.cashAmount
local Players = game:GetService("Players")
local CashValue = game:WaitForChild(game.Players.LocalPlayer.leaderstats.Cash)

while true do
	cashAmount.Text = CashValue.Value
	wait(0.1)
end

Any help would be great, thanks for reading.

1 Like

replace with

local CashValue = game.Players.LocalPlayer:WaitForChild('leaderstats'):WaitForChild('Cash')

2 Likes

Ah didn’t realise it would be that simple haha. Thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.