How to turn my player character into an Npc character?

now, i know the reason. after look at the animate script.
it is because the script is for R6 not R15

2 Likes

Oh. Ok…

Replace the animate script with this: AnimateLocal.rbxm (6.7 KB)

Do this:

LocalScript << Remember inside of the proximity script
game.Workspace.CurrentCamera.CameraSubject = script.Parent:WaitForChild("Humanoid")
pcall(function()
	script.Parent:WaitForChild("Animate").Disabled = true
	script.Parent:WaitForChild("Animate").Disabled = false
end)
Proximity Script
local prompt = script.Parent

prompt.TriggerEnded:Connect(function(player)

	print(player)

	local gamePassId = 22080195 -- Gamepass ID here

	local userId = player.userId

	if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(userId,gamePassId) == false then

		print("Player Does Not Have Gamepass")

		game:GetService("MarketplaceService"):PromptGamePassPurchase(player, gamePassId)

	else

		print("Player Has Gamepass")

		local character = player.Character
		character.Archivable = true

		local clone = character:Clone()

		clone:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(character:WaitForChild("HumanoidRootPart").Position)

		local newcharLocation = game:GetService("ServerStorage").KitClones.NoobKit

		local newchar = newcharLocation:Clone()

		newchar.Parent = workspace

		newchar.Name = player.Name

		player.Character = newchar

		player.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(clone:WaitForChild("HumanoidRootPart").Position)
		player.Character:WaitForChild("HumanoidRootPart").Anchored = false
		local LS = script:WaitForChild("LocalScript"):Clone()
		LS.Parent = player.Character
		LS.Disabled = false
	end

end)

[EDIT: I ACCIDENTALLY PUT THE WRONG FILE, SO IF IT DIDN’T WORK TRY TO DOWNLOAD AGAIN]

2 Likes

@incognitobot_rblx I said to change avatar type to R6 from the beginning…

2 Likes

also im getting an error:
Workspace.Probloxed123.Animate:739: attempt to index nil with 'Chatted'

the animate script im using is:
Animate.rbxm (9.8 KB)
its for R15

1 Like

why me :sweat_smile:
forgive me :sweat_smile:

2 Likes

I accidentally put the wrong script, if you didn’t already notice…
So try again if didn’t work: AnimateLocal.rbxm (6.7 KB)

2 Likes

you need to remove emote code script

2 Likes

Okay I changed to R6 and did everything you said but no animation…

1 Like

what is emote script??

abcdefg

1 Like

Do you mind if I get edit permissions on your game, or at least send me the game file in messages, so I can look at it better. I don’t want to sit here all day.

2 Likes

Does your custom character even have an animator? If it doesn’t, no animations will play. Roblox migrated the Animate script over to Animator instead of Humanoid:LoadAnimation()

3 Likes

Gamepass Prompt Testing.rbxl (56.1 KB)

1 Like

i dont know where the animator is …

1 Like

@Ioveczour @The_flyingMan716 @Vyntrick @12Strings

Thanks for helping me and devoting your time. I really appreciate it.

But… I have to go now, I will be back later :slight_smile:

2 Likes

This should work: Gamepass Prompt Testing.rbxl (55.4 KB)

Just open the file, and publish it to the place. Make sure to set the game to R6. You can set the game to R15 too… It doesn’t matter.

2 Likes

It’s located under the Humanoid. If it’s not present, animations won’t play. (depending on if the person used Animator:LoadAnimation() or Humanoid:LoadAnimation())

2 Likes
local MPService = game:GetService("MarketplaceService")
local Storage = game:GetService("ServerStorage")
local prompt = script.Parent
local gamePassId = 22080195

prompt.TriggerEnded:Connect(function(player)
	if not MPService:UserOwnsGamePassAsync(player.UserId, gamePassId) then
		print("Player Does Not Have Gamepass")
		MPService:PromptGamePassPurchase(player, gamePassId)
	else
		print("Player Has Gamepass")
		local character = player.Character
		local hmr = character:WaitForChild("HumanoidRootPart")
		local clone = character:Clone()
		clone.Parent = workspace
		clone:WaitForChild("HumanoidRootPart").Position = character:WaitForChild("HumanoidRootPart").Position
		local newChar = Storage:WaitForChild("KitClones"):WaitForChild("NoobKit")
		local newCharClone = newChar:Clone()
		newCharClone.Parent = workspace
		character = newCharClone
		hmr.Position = newCharClone:WaitForChild("HumanoidRootPart").Position
	end
end)

Must be a server script inside the “ProximityPrompt” instance.

2 Likes

Gamepass Prompt Testing.rbxl (59.6 KB)
support R15. No need to change to R6 in setting.

2 Likes

It was already a server script at the start

1 Like

@Ioveczour Thanks a lot for helping me :smiley: this worked!

Also, I would also like to shoutout to @The_flyingMan716 for also helping me.

Thanks again to @12Strings @Vyntrick @Limited_Unique for your help and time!

3 Likes