Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.ReplicatedStorage.LoadBuild.OnServerEvent:Connect(function(player)
- local s,e = pcall(function()
- local build = BuildsDataStore:GetAsync(player.UserId)
- for i, tab in pairs(build) do
- local block = Instance.new("Part",workspace)
- block.Name = "BuiltBlock"
- block.Position.X = tonumber(tab.Position.X)
- block.Position.Y = tonumber(tab.Position.Y)
- block.Position.Z = tonumber(tab.Position.Z)
- block.Size = tonumber(tab.Size)
- block.Material = tab.Material
- block.BrickColor = tab.Color
- end
- end)
- if s then
- print("Successfully loaded build!")
- elseif not s and e then
- print("Not successful: "..e)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment