-
My pick up gem script often works. However, sometimes for some players it does not. It is inconsistent. I need suggestions on how to fix. I have 5 gems in the game, Blue, Pink, Yellow, Green, Purple. Each gem uses a copy of the same script (only the gem name is different). Many people complain they cannot get the Pink gem, but other gems will also sometimes not pick up, like yellow gem in the below YouTube example.
-
Please see this YouTube video of 2 players playing the game. We Bought a MAGIC BALLOON! Roblox MAGIC BALLOON STORY - All Endings! ft SuperDog Tyler - YouTube
Time: 17:10 - 17:25 both players are able to get the blue gem. Good!
Time: 18:20 - 18:55 superdog_tyler can get the pink gem but snowi_fox cannot get the pink gem. Bad!
Time: 19:35 - 19:50 snowi_fox tries to get the pink gem again, but it will not give it to her. Bad!
Time: 20:30 superdog_tyler can get the green gem & Time: 22:10 snowi_fox can get the green gem. Good!
Time: 22:40 superdog_tyler can get the purple gem & Time: 23:08 snowi_fox can get the purple gem + magic wand. Good!
Time: 23:38 superdog_tyler can get the yellow gem & Time: 24:00 snowi_fox cannot get the yellow gem. Bad! -
It always works great for me. However, it is not always working for some players online. It seems so random. I am soooo lost how to troubleshoot this.
Players are reporting this gem pick up bug on my fan page. Mostly people complain specifically about the Pink gem. However, the Green gem has also been specifically mentioned. Also, we see in the above YouTube, the Yellow gem not working for snowi_fox, but being fine for superdog_tyler.
One of my players thinks they fixed the bug by changing their “metaverse clothing”. I have not confirmed this, but this is what they wrote: Hi pizzashark, I found a very interesting bug. It’s only the pink gem in the magic map part. It didnt give me the pink gem even if I touched it, because I was wearing metaverse clothing (wren’s pants and fey shirt). When I changed to other clothing, then only it gave me the pink gem. But I have no idea if this bug will exist with other metaverse pants and shirts or some combination of them. This is a secret bug LOL.
In the game there are also 3 Magic Wands and 5 Apples to pick up. No one has ever complained about these items. Therefore, I think people may not have trouble picking these up. The scripts to pick these items up are mostly similar to the gem pick up scripts.
-- This is code for picking up the the pink gem, the one people complain about most.
local trigger = script.Parent
local DB = false
---------------------------------------------------------
trigger.Sound.SoundId = "rbxassetid://3302699870"
pickUpItem = "Pink Gem"
---------------------------------------------------------
trigger.Touched:Connect(function(hit) -- when touch the parent
if DB then return end -- In DeBounce?, no go!
DB = true
if hit == nil then return end -- no ?, no go!
if hit.Parent == nil then return end -- no parent?, no go!
local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- get player from hit
if player ~= nil and player:FindFirstChild("Backpack") then -- are you a player with backpack?
if player.Backpack:FindFirstChild(pickUpItem) or player.Character:FindFirstChild(pickUpItem) then -- Already have it.
print("I already have the " .. pickUpItem)
else
local item = game.ReplicatedStorage:FindFirstChild(pickUpItem):Clone() --Clone tool from Replacated Storage
item.Parent = player.Backpack -- Put tool in Players Backpack
local humanoid = player.Character:FindFirstChildOfClass("Humanoid") --Make Player hold it in hand
humanoid:EquipTool(item)
local item = game.ReplicatedStorage:FindFirstChild(pickUpItem):Clone() --Clone tool from Replacated Storage
item.Parent = player.StarterGear -- Put tool in Players Backpack
trigger.Sound:Play()
--trigger.Sound.Parent = game.Workspace --keep acitve if this is a ONCE TIME PICK UP
--trigger:Destroy() --keep acitve if this is a ONCE TIME PICK UP
trigger.Looker.Transparency = 1
end
wait(2)
DB = false
trigger.Looker.Transparency = 0.4
trigger.PointLight.Brightness = 4
end
end)
-- This is the script to pick up the purple gem, this one worked fine in the YouTube. Notice it is identical to the problematic pink gem (except for gem name)
local trigger = script.Parent
local DB = false
---------------------------------------------------------
trigger.Sound.SoundId = "rbxassetid://3302699870"
pickUpItem = "Purple Gem"
---------------------------------------------------------
trigger.Touched:Connect(function(hit) -- when touch the parent
if DB then return end -- In DeBounce?, no go!
DB = true
if hit == nil then return end -- no ?, no go!
if hit.Parent == nil then return end -- no parent?, no go!
local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- get player from hit
if player ~= nil and player:FindFirstChild("Backpack") then -- are you a player with backpack?
if player.Backpack:FindFirstChild(pickUpItem) or player.Character:FindFirstChild(pickUpItem) then -- Already have it.
print("I already have the " .. pickUpItem)
else
local item = game.ReplicatedStorage:FindFirstChild(pickUpItem):Clone() --Clone tool from Replacated Storage
item.Parent = player.Backpack -- Put tool in Players Backpack
local humanoid = player.Character:FindFirstChildOfClass("Humanoid") --Make Player hold it in hand
humanoid:EquipTool(item)
local item = game.ReplicatedStorage:FindFirstChild(pickUpItem):Clone() --Clone tool from Replacated Storage
item.Parent = player.StarterGear -- Put tool in Players Backpack
trigger.Sound:Play()
--trigger.Sound.Parent = game.Workspace --keep acitve if this is a ONCE TIME PICK UP
--trigger:Destroy() --keep acitve if this is a ONCE TIME PICK UP
trigger.Looker.Transparency = 1
end
wait(2)
DB = false
trigger.Looker.Transparency = 0.4
trigger.PointLight.Brightness = 4
end
end)
-- This is a script to pickup the apple, this one worked fine in the YouTube, and no one ever complains about the apples.
local trigger = script.Parent
local DB = false
---------------------------------------------------------
trigger.Sound.SoundId = "rbxassetid://3302699870"
pickUpItem = "Apple"
---------------------------------------------------------
trigger.Touched:Connect(function(hit) -- when touch the parent
if DB == true then return end
DB = true
if hit == nil then return end -- no ?, no go!
if hit.Parent == nil then return end -- no parent?, no go!
local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- get player from hit
if player ~= nil and player:FindFirstChild("Backpack") then -- are you a player with backpack?
local item = game.ReplicatedStorage:FindFirstChild(pickUpItem):Clone() --Clone tool from Replacated Storage
item.Parent = player.Backpack -- Put tool in Players Backpack
local humanoid = player.Character:FindFirstChildOfClass("Humanoid") --Make Player hold it in hand
humanoid:EquipTool(item)
local item = game.ReplicatedStorage:FindFirstChild(pickUpItem):Clone() --Clone tool from Replacated Storage
item.Parent = player.StarterGear -- Put tool in Players Backpack
local PlayerName = player.Name -- Get and Send Name
print("Player name is " .. PlayerName)
game.ServerScriptService.PlayerApple.Value = player
trigger.Sound:Play()
trigger.Sound.Parent = game.Workspace --keep acitve if this is a ONCE TIME PICK UP
trigger:Destroy() --keep acitve if this is a ONCE TIME PICK UP
end
DB = false
end)