#why not value change when i walk trough door?
1 messages · Page 1 of 1 (latest)
Are you sure the value of ownervalue is nil?
Maybe it's nothing like ""
i dont understand?
You have typed if values.ownervalue.value == nil then
Try if values.ownervalue.value == "" then
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
Oh okay i thought it was string value
any other ideas??
I'll try to find, am not very professional but ill try
ty
Sorry i couldnt find but print can help to find where the issue is
** You are now Level 7! **
HasTycoon.Parent=?
what u mean?
oh you have player as second arg to instance.new
i think
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 👍
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 😮💨
sht mb
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
ok
** You are now Level 2! **
majority of api is written in PascalCase so any properties or functions start with a capital
didnt know that ty
but this one is good why the error
what does the error say? turn your brain on and try to interpret it and tell me what you think it could possibly mean?
i think it says that title is not made?
not correct...?
the output window can easily tell you if your theory is correct. put it into practice!
well done, i knew you had it in you! 