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?
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?
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.