So I create the proximityprompt on the client for the model that is also created on the client. The problem is that i need to tween the position of the model on the client. That proximityprompt registers a position only once it created and replicates it to the server. It’s position is changing during the tween yeah, but the distance property which decides if the proximityprompt should be visible or not is not tweening, because it doesn’t replicated the position of the proximityprompt to the server. I need a resolution how to tween it so it replicated the position. I’ve tried updating the position of the proximityprompt’s parent in the cycle, tried to do the +0.1 and -0.1 Ypos so maybe it sends a new position when it changed only, no progress. Tried removing the parent and adding the same one, it makes the proximityprompt dissapear and appear which is not what i need. I need an idea how to update the position of proximityprompt with making it not showing any major visual changes on the client like spamming visibility, disappearing and appearing etc.
Could you provide some code here? Your issue makes sense to me, but your reasoning with replication does not.
This is not a replication issue, because that prompt or its position should never replicate to the server regardless, as long as you are making it on the client.
I just tested your exact example in studio, because I know tween service will not fire changes to position when listening to .Changed or :GetPropertyChangedSignal(). So I figured that perhaps the prompt could fail to move as well. However my proximity prompt seems to move just fine.
Here was my code that works without issue:
--player.StarterPlayerScripts.LocalScript
script:WaitForChild("Part"):Clone().Parent = workspace --part with a proxy prompt under it
task.wait(3)
game:GetService("TweenService"):Create(
workspace.Part,
TweenInfo.new(30),
{Position=Vector3.new(100,1,0)}
):Play()
The prompt moves perfectly, everything is made and done on the client, DNE on server.
I use attachement as a proximityprkmpt parent. The attachment is child of the model, Model position is tweened by it’s primarypart. The system i need that for is eggs conveyor as in brainrot games. Visually the proximityprompt ui is updating it’s position, but on back-end it doesn’t update it’s position to count if magnitude between player and the proximityprompt is eligable to show the prozimityprompt or hide it from user interface
Could you send your code where you tween please?
local Thread = TweenService:Create(EggModel.PrimaryPart, TweenInfo.new(13.5, Enum.EasingStyle.Linear), { CFrame = EndCFrame})
Thread:Play()
local ProximityPrompt = PlotLocalFunctions.CreateProximityPrompt(ProximityAttachment, function(ProximityPrompt: ProximityPrompt)
ProximityPrompt.KeyboardKeyCode = Enum.KeyCode.E
ProximityPrompt.Enabled = false
ProximityPrompt.ObjectText = "$"..AbbreviatedCost
ProximityPrompt.ActionText = "Purchase Egg"
ProximityPrompt.MaxActivationDistance = 25
ProximityPrompt.MaxIndicatorDistance = 25
ProximityPrompt.HoldDuration = .2
ProximityPrompt.RequiresLineOfSight = false
end) :: ProximityPrompt