So I'm having a bit of trouble trying to make a morph gamepass that when you activate the proximity prompt it'll give you a gamepass prompt and then it will morph you. When you activate the proximity prompt nothing happens. Here is the following code:
local model = script.Parent local prompt = model.Prompt.ProximityPrompt prompt.Triggered:Connect(function(player) local oldCharacter = player.Character local morphModel = model:FindFirstChildOfClass("Model") local newCharacter = morphModel:Clone() local MarketPlaceService = game:GetService("MarketplaceService") local ownsGamepass = MarketPlaceService:UserOwnsGamePassAsync(player.UserId,20094414) if ownsGamepass then newCharacter.HumanoidRootPart.Anchored = false newCharacter:SetPrimaryPartCFrame(oldCharacter.PrimaryPart.CFrame) player.Character = newCharacter newCharacter.Parent = workspace end end)
Can somebody help me? If they can send me a redone code that would be awesome. Thank you! Note: This is in a model with another model and the model inside the model is the morph.