So I have this placement system that is working great but I’m attempting to make the placement as reponsive for the player who placed so they see the change as soon as possible and this works and everything but my main problem now is that any attempt to remove the client copy of the model causes like this annoying flickering because im guessing because the server model is in the exact same location
The server cannot detect a client model, meaning it will spawn in the exact same location, and the flickering will only happen on the client. Try turning cancollide off until it is placed
Hm, cancollide is actually off already and that didn’t seem to do anything although when I tried moving the model to a CFrame of something like CFrame.new(100,100,100)
the flickering didnt happen but of course the model is still there so that’s the problem
Is there a reason you HAVE to do the movement on the client? When I tried my hand at making a placement system I found it to be, like, a 0.1 second delay. If not, then just have the server model not spawn in until it is placed then destroy the temp client model.
Yeah but the same thing would happen though because they are both in the same location so when I go to destroy it idk probably something with the rendering causes it to obviously flicker on my client cause my client is the one who created the local copy of the model
Also wdym movement on the client?
Can you send a video? I’m having a hard time understanding wym by flickering
ye youll hold on let me send it right NOW
its more noticable on the 1st and 2nd ones I place (i slowed down the video a bit too)
I don’t really see anything out of the ordinary lol. Maybe I’m missing something?
I dont think your looking closely enough, look at the 1st placement and the 3rd placement its pretty noticable
Also this is my client code for placement
placementCooldown = true
workspace.Sounds.Place:Play()
local captureCFrame = finalCFrame
local captureX = currentX
local captureY = currentY
local cloned : Model = piece:Clone()
cloned.Parent = workspace
cloned:PivotTo(finalCFrame)
cloned.Indicator:Destroy()
local params = {}
params.model = cloned
params.callback = function()
if piece then
RemoteManager.Place:FireServer({captureX, captureY, piece.Name, gridSize, captureCFrame, choosenCategory})
cloned:Destroy()
task.wait(.15)
placementCooldown = false
end
end
RenderEquipment.LocalRender(params)
Wait, by jittering do you mean the model getting bigger or the models flickering
You have to wait for the model in server to load then destory that model in client.
Nope the model flickering for just a split second and its annoying
How would I know when the model on the server was completed loaded, I even waited .15 seconds before destroying the client model and tried a higher wait time and that still didnt eliminate the flickering
AHHH I see what u mean, where the model dissapears for a short second?
locationBlahBlah:FindFirstChild(itemName)
You can repeat this until it doesnt return nil
What if I have multiple items with the same name?
Just make the item name on the server have Temp in it until the client one is destroyed using a remote or something.
You could use a RemoteFunction
instead of a RemoteEvent
since it seems like you want to rely on the Server invoke to finish before deleting the client model (Client will yield until the server returns, in this case the return would be telling you the server model was placed)
have you just tried removing the client side model before you fire to the server to place the item
this may be a better method depending on the delays you have in the server side code
Okay so I managed to this it due to a combination of what you guys said, so when I place something it goes inside of a specific folder on the players plot so I just created a connection for a ChildAdded event on that folder and then inside of thhat I destroyed the client copy of the build and it’ working flawlessly, thanks!