so basically i'm trying to make this script where their base is destroyed when they leave so bases dont clutter and stuff but testing this on a 2 player local server doesnt work and gives said error in the title.
I tried putting it as
game.Workspace.name:Destroy()
but the same thing happens. I have checked and the name of the model I'm trying to destroy corresponds to the code. Maybe I'm missing something here? This script is on a normal script inside the workspace also filteringenabled is enabled. Must I fire to a client or something?
game.Players.PlayerRemoving:connect(function(player)
local name = player.Name.."Base"
local Thing = game.Workspace.name
print(name)
Thing:Destroy()

1 comment
wow thanks that worked.