local SelectPlotRemoteEvent = game.ReplicatedStorage:WaitForChild("Remotes").PlotSelection.SelectPlot
local UpdateCanvasRemoteEvent = game.ReplicatedStorage:WaitForChild("Remotes").PlotSelection.ServerToClient.UpdateCanvas
local PlotOwners = require(game.ReplicatedStorage:WaitForChild("Modules").PlotDataModules.PlotData)
function SelectPlot(player, Selected, Max)
local SelectedPlot = game.Workspace.Plots:WaitForChild("Plot".. Selected)
if PlotOwners.Plots:FindFirstChild("Plot".. Selected).Claimed == true then
print(player.. " was reported plot wipe exploit.")
player:Kick("ERROR: Please rejoin, there was a problem.")
else
PlotOwners.Plots:FindFirstChild("Plot".. Selected).Claimed = true
PlotOwners.Plots:FindFirstChild("Plot".. Selected).Owner = player
end
--UpdateCanvasRemoteEvent:FireClient(player, SelectedPlot)
end
SelectPlotRemoteEvent.OnServerEvent:Connect(SelectPlot)
Now unfortunately, this doesn’t work correctly. Any ideas?
local SelectPlotRemoteEvent = game.ReplicatedStorage:WaitForChild("Remotes").PlotSelection.SelectPlot
local UpdateCanvasRemoteEvent = game.ReplicatedStorage:WaitForChild("Remotes").PlotSelection.ServerToClient.UpdateCanvas
local PlotOwners = require(game.ReplicatedStorage:WaitForChild("Modules").PlotDataModules.PlotData)
function SelectPlot(player, Selected, Max)
local SelectedPlot = game.Workspace.Plots:WaitForChild("Plot".. Selected)
if PlotOwners.Plots["Plot".. Selected].Claimed == true then
print(player.. " was reported plot wipe exploit.")
player:Kick("ERROR: Please rejoin, there was a problem.")
else
PlotOwners.Plots["Plot".. Selected].Claimed = true
PlotOwners.Plots["Plot".. Selected].Owner = player
end
--UpdateCanvasRemoteEvent:FireClient(player, SelectedPlot)
end
SelectPlotRemoteEvent.OnServerEvent:Connect(SelectPlot)
Its support to be used for a remote event, the remote event will send the plot location to a different script later. This is where the remote event is though:
Print Plotowners.Plots and see what you get, check the table and send it in. If you print a table there’s a arrow next to it, click it and it’ll open. Send the content