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)
If it doesnāt work, then re-add the animation script, and try again.
I already converted to server script, in my last post.
Butā¦
To convert to server script, you would just copy the source of the LocalScript and paste it into a server script.
It really depends on what you are trying to do with a script. For example, you would have to find a Player, instead of using game.Players.LocalPlayer because itās not a LocalScript.
After converting, change the original server script to:
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
pcall(function()
player.Character.Animate.Disabled = true
player.Character.Animate.Disabled = false
end)
end
end)
If youāre all confused and stuff:
Just do that and then, change the proximity prompt script:
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
pcall(function()
player.Character.Animate.Disabled = true
player.Character.Animate.Disabled = false
end)
end
end)
Okay so my character has animation now, but the animation is delayed. For example, if I hold W, the animation will only start after about 0.5 seconds. If I tap W very quickly, my character moves, but no animationā¦
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]