it doesn’t end because of the error I said in the post before
Edit: fixed code inside of if statement to set wallName index to true
From the code you first gave us the issue stems from indexing a nil value within your if statement.
To fix this, just set the index to an empty table if there isn’t already one one.
Using the first block of code you provided:
dictionary = {}
local wallName = wall.Name
local stageName = wall.Parent.Name
----------- this is in a touched event
dictionary[player.Name] = dictionary[player.Name] or {}
dictionary[player.Name][stageName] = dictionary[player.Name][stageName] or {}
if not dictionary[player.Name][stageName][wallName] then
dictionary[player.Name][stageName][wallName] = true
elseif dictionary[player.Name][stageName][wallName] then
return
end
-----------
If there are other issue than that, I’ll look into the additional code you’ve provided.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.