#why not value change when i walk trough door?

1 messages · Page 1 of 1 (latest)

lunar palm
lapis halo
#

Maybe it's nothing like ""

lunar palm
#

i dont understand?

lapis halo
#

You have typed if values.ownervalue.value == nil then

#

Try if values.ownervalue.value == "" then

lunar palm
#

local mainitems = tycoon:FindFirstChild("mainitems")
local values = tycoon:FindFirstChild("values")

mainitems.ownerdoor.DOOR.Touched:Connect(function(hit)
    if values.ownervalue.value == "" then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        if player then
            if player:FindFirstChild("HasTycoon").value == false then
                                player:FindFirstChild("HasTycoon").value = true
                values.ownervalue.value = player

                mainitems.ownerdoor.Title.SurfaceGui.TextLabel.Text = tostring(values.ownervalue.value).."'s Tycoon"
            end
        end
    end
end)``` this dont work
lapis halo
#

Oh okay i thought it was string value

lunar palm
lapis halo
#

I'll try to find, am not very professional but ill try

lunar palm
#

ty

lapis halo
#

Sorry i couldnt find but print can help to find where the issue is

gaunt daggerBOT
#

studio** You are now Level 7! **studio

white yacht
lunar palm
white yacht
#

oh you have player as second arg to instance.new

lunar palm
#

i think

white yacht
#

i can't see anything obviously wrong, but your spelling might be wrong, check output window for any errors

#

also adding prints to see where code is or is not running is often helpful 👍

lunar palm
white yacht
# lunar palm

Name instead of name cmon what i just say, your spelling might be wrong and to check output window for any errors. cmon you failing at a first guess. auuugh 😮‍💨

lunar palm
#

sht mb

white yacht
#

its not just that one, you have lowercase a lot where uppercase is expected like you write value when it should be Value. roblox is convenient a lot but you probably should not rely on that

lunar palm
#

ok

gaunt daggerBOT
#

studio** You are now Level 2! **studio

white yacht
#

majority of api is written in PascalCase so any properties or functions start with a capital

lunar palm
white yacht
lunar palm
#

not correct...?

white yacht
lunar palm
#

IT WORKS

#

YESS

#

TY

white yacht
#

well done, i knew you had it in you! fingerguns