|
| 07 Jun 2017 11:53 PM |
Alright. I'm making my own tool that lets you place 'blocks' where you click. Since there is filtering enable available. I'm going to use remote events to place blocks for everyone to see.
--< A Server Script in ServerScriptService >-- remote.Main.PlaceModel.OnServerEvent:Connect(function(player,model,assetGroup,cframe) local playerBase = workspace.BuildingAreas:FindFirstChild("Area"..player.gameData.baseNumber.Value) local myStorage = workspace.ConstructionStorage:FindFirstChild(player.Name.."'s construction") local base =
workspace.BuildingAreas:FindFirstChild("Area"..player.gameData.baseNumber.Value) local reg = Region3.new(base.RegionPart1.Position,base.RegionPart2.Position) local finalRegion3 = workspace:FindPartsInRegion3(reg,player.Character)
or _, part in pairs(finalRegion3) do --< Make sure the cursorBlock is in the player's build area. print(part.Parent.Name) if part.Parent.Name == model then local finalProduct = replicatedStg.GameStg.GameBlks:FindFirstChild(assetGroup):FindFirstChild(model ):Clone() finalProduct.Parent = myStorage finalProduct.ModelConfig.ModelOwner.Value = player finalProduct:SetPrimaryPartCFrame(cframe) finalProduct.Name = finalProduct.Name.." (#"..math.random(1,100000)..")" break end end end)
As you can see, I'm using Region3 functions to make sure the player is not stamping out if his/her baseplate. The problem is, after a while of placing blocks, you can't place anymore blocks all of a sudden (Non - stop placing), If you click during this time, no block will be placed. Is there a way to fix this problem?
Thank you.
NoBoot. |
|
|
| Report Abuse |
|
|
|
| 07 Jun 2017 11:55 PM |
After about how many models/blocks on average? After about how long on average? Could it be because you're inserting too many models within a short amount of time? (Not sure if this is throttled)
discord.gg/fissygames |
|
|
| Report Abuse |
|
|
|
| 07 Jun 2017 11:58 PM |
The remote event fires everytime I place a block. I'm also aware of the limits a Remote Event has. But this is another problem, I completely removed the region3 functions or anything that had to do with region3, and it worked. Is it because of the region3?
(The region3 is there so players won't place out of their baseplate BTW.) |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2017 12:01 AM |
It might have something to do with how resource intensive Region3s and Rays are. I'm not sure. But now that you've found part of your source, start adding pieces back slowly and see what messes it up. If it's Region3s in general, then try a different approach.
discord.gg/fissygames |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2017 12:05 AM |
| Alright! Thanks for the help! I'll be sure to reply back if something isn't right! |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2017 11:36 PM |
It appears that i could not fix the problem doing what you said. Is there any solution to this annoying problem?
Thanks. |
|
|
| Report Abuse |
|
|