I think its because of "LocalPlayer" but I am not sure. I am trying to move the TarantulaPet to the players character folder.
local gamePassID = 0000000
local function onPlayerAdded(player)
local hasPass = false
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
end)
if not success then
warn("Error while checking if player has pass: " .. tostring(message))
return
end
if hasPass == true then
player.CharacterAdded:connect(function(character)
game.ServerStorage:FindFirstChild("TarantulaPet"):Clone().Parent = game.Players.LocalPlayer.Character
end)
end
end
Players.PlayerAdded:Connect(onPlayerAdded)

1 comment
Is this in a local script?