Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Proximity prompt plays animation on part?

I have a fbx model that I animated, and I want the animation to play when you proximity prompt click it.

How do I do this?

1 answer

This should work.

local ProximityPromptService = game:GetService("ProximityPromptService")
local Animation Location = where your animation is located

local function onPromptTriggered(promptObject, player)
	player.Character.Humanoid:LoadAnimation(AnimimationLocation):Play()
end

ProximityPromptService.PromptTriggered:Connect(onPromptTriggered)

This discussion is preserved as it was. New answers, comments, and votes are closed.