i was making a inventory script for my game but on line 13 21 36 it gives a error X cannot be assigned to
local IOS = 0
local Ys = {0.027, 0}
local Xs = {0.039, 0}
local placeholeder = script.Parent.Parent.ITEMNAMERHERE
function items()
for _, child in pairs(script.Parent:GetChildren()) do
if child.Name ~= "Itmesscripts" then
child:Destroy()
end
end
for _, child in pairs(game.Players.LocalPlayer.Items:GetChildren()) do
if child.Value > 0 then
placeitem(child.Name)
end
end
end
function placeitem(NAME)
local itme = placeholeder:Clone()
itme.Parent = script.Parent.Parent.ScrollingFrame
itme.Position.X = Xs
itme.Position.Y = Ys
IOS = IOS + 1
if Xs == {0.039, 0} then
Xs = {0.493, 0}
else
Xs = {0.039, 0}
Ys[1] = Ys[1] + 0.078
end
local amout = game.Players.LocalPlayer.Items[NAME].Value
itme.TextLabel.Text = NAME .. "\N" .. amout
placeholeder.Visible = true
end
while true do
items()
wait(1)
end
