This is a local script In starterplayerscripts the purpose of it is to enabled and disable proximity prompts. In the script I am getting an error for Enabled on the second line where I Enabled A proximity prompt to true. I already have tried to debug and check to make sure boothModel.Part.Remove.Enabled exists. And it does. So why is Enabled being thought as a function? attempt to index function with ‘Enabled’ How can I fix this?
Local script:
game.ReplicatedStorage.Events.LR2024.OnClientEvent:Connect(function(Booths)
local player = game.Players.LocalPlayer
local Stand = game.Workspace.Stands:FindFirstChild(player.Name)
local folder1 = Stand.Booth
local folder2 = Stand.Booth1
local folder3 = Stand.Booth2
local boothModel = folder1:FindFirstChild(Booths) or folder2:FindFirstChild(Booths) or folder3:FindFirstChild(Booths)
if boothmodel then
boothModel.Part.OwnerPrompt.Enabled = false
boothModel.Part.Remove.Enabled = true --error on this line??
end
end)