I have never made a plot system before and mine is not working does anyone have any ideas I could use to make ie work?
Heres my code:
local Player = game.Players.LocalPlayer
local PlotCamRemote = game.ReplicatedStorage.PlotCam
local Cam = workspace.CurrentCamera
PlotCamRemote.OnClientEvent:Connect(function(player)
local Clicked = false
local done = false
print(Player)
wait(2)
Player.PlayerGui.PlotSelection.Enabled = true
for _,plot in ipairs(workspace.Plots:GetChildren()) do
if done == true then
return
end
if plot.Owner.Value == "N/A" then
Cam.CameraType = "Scriptable"
Cam:Interpolate(plot.Cam.CFrame, plot.CFrame, 1.25)
while Clicked == false do
wait(1)
Player.PlayerGui.PlotSelection.Background.SelectPlotButton.MouseButton1Click:Connect(function()
game.Workspace[Player.Name].HumanoidRootPart.CFrame = plot.Cam.CFrame
Cam.CameraType = "Custom"
Cam.CameraSubject = Player.Character.Humanoid
Clicked = true
done = true
end)
Player.PlayerGui.PlotSelection.Background.NextPlotButton.MouseButton1Click:Connect(function()
Clicked = true
print("next")
end)
Player.PlayerGui.PlotSelection.Background.PreviousPlotButton.MouseButton1Click:Connect(function()
Clicked = true
print("previous")
end)
end
end
end
end)