How to make minecrate move using ProximityPrompt?

hi, guys I need like help in how to make a minecrate move using the ProximityPrompt is there also an easier way


I have tried some solutions but still also no need to just make it move without rolling wheels

it will have a limit when passing i marked like waypoints

1 Like

Could you update your post to further describe some of the solutions you’ve tried? ProximityPromt is just a button to activate something, it doesn’t really have a relation to movement. Your question kinda misses the point of what you’re actually asking for.

1 Like

ok i will i’m like new here not alot of time i’m posting

1 Like

some people use it for elevators and moving walls

1 Like

Have you tried using TweenService for movement?

1 Like

Could you detect once the prompt is triggered then just gradually increase the carts origin position. (Assuming the carts a model.)

1 Like

let me show more explain here https://gyazo.com/9b9daf71d5a861982296937cddca99e6

1 Like

i tried like changing the door mesh to the cart so it flee like its sideing

1 Like

my idea is like this door just when you click the cart it move

1 Like

Yeah it definitely uses TweenService. ProximityPromt works like a ClickDetector & the function works the same way as well.
image

script.Parent.ProximityPrompt.Triggered:Connect(function(player)
 --Make a Tween
end)

https://developer.roblox.com/en-us/api-reference/class/TweenService

1 Like

there is like two scripts in the ServerScriptService

1 Like
---ServerScriptService PromptEvents the first is this --

local ProximityPromptService = game:GetService("ProximityPromptService")
local ServerScriptService = game:GetService("ServerScriptService")

local ObjectActions = require(ServerScriptService.ObjectActions)

-- Detect when prompt is triggered
local function onPromptTriggered(promptObject, player)
	ObjectActions.promptTriggeredActions(promptObject, player)
end

-- Detect when prompt hold begins
local function onPromptHoldBegan(promptObject, player)
	ObjectActions.promptHoldBeganActions(promptObject, player)
end

-- Detect when prompt hold ends
local function onPromptHoldEnded(promptObject, player)
	ObjectActions.promptHoldEndedActions(promptObject, player)
end

-- Connect prompt events to handling functions
ProximityPromptService.PromptTriggered:Connect(onPromptTriggered)
ProximityPromptService.PromptButtonHoldBegan:Connect(onPromptHoldBegan)
ProximityPromptService.PromptButtonHoldEnded:Connect(onPromptHoldEnded)

this is the first script

1 Like

What here does ObjectActions do?

1 Like

let me show you how it looks
image
also, it does actions to the object that we have like it fire the function to make the proximity prompts work

1 Like

The main script already fires the events & creates a function for each action the proximityprompts does. You just need to make a Tween which is documented on how to use through the link I gave. Try take a look at that.
Wait nvm, looks like a lot of code just for an event to fire. But still try take a look at Tween, as it doesn’t seem you’ve taken a look at that.

1 Like

If you want the cart to move by equal speed between all points. You can divide the length by a given speed. (Minecart.Position - NextPoint.Position).Magnitude/Speed & use that in your TweenInfo time.

1 Like