Everyone has their own unique style of naming things. It would be rude if we tell them to fix how they name things. Won’t it? For example: Me! I call all my scripts “Handler”. Which can be confusing for others.
idk Its easy for me to understand
OH, THIS SHOULD BE THE ISSUE, Note: According to documentation (sorry I can’t remember where it is sourced - or either I randomly read it somewhere). Local scripts that are not under Player scripts won’t work
Could you show the code for the local script?
Apologies, I did not mean to come off with that tone
Sorry but the OP has not said anything about a local script. Its all a server-sided script. And the script is working fine. Its just the part is not changing its transparency.
No worries!
Sure but I warn you it is much more hard to understand.
--Other
local GetTool = script.Parent
local PlayerInput = game:GetService("UserInputService")
--Tag
local CollectionService = game:GetService("CollectionService")
--Gets player and player mouse
local GetPlayer = game:GetService("Players").LocalPlayer
local Mouse = GetPlayer:GetMouse()
--Gets Character then Humanoid
local character = GetPlayer.Character or GetPlayer.CharacterAdded:wait()
local HumanoidRootPart = character:WaitForChild('HumanoidRootPart')
--Click detector
local GetClick = GetTool.Handle.ClickDetector
--Bool Value
local GetBool = GetClick.CanPickOrNot
local CanPutCD = workspace.CDplayer.CanPut
-----------------------------Functions---------------------------------
GetTool.Equipped:Connect(function()
GetBool.Value = false
end)
GetTool.Unequipped:Connect(function()
GetBool.Value = true
end)
local workDistance = 6
GetTool.Activated:Connect(function(Input)
if (Mouse.Target.Position - HumanoidRootPart.Position).magnitude < workDistance then
if CollectionService:HasTag(Mouse.Target, "CanDrop") then
if GetClick.Yellow.Value == true and CanPutCD.Value == true then
if GetBool.Value == false then
CanPutCD.Value = false
GetTool:Destroy()
Mouse.Target.Parent.YellowCD.Transparency = 0 -- Makes the yellow part visible
Mouse.Target.Parent.YellowCD.CanPick.Value = true -- Set the CanPick to true
GetBool.Value = true
end
end
end
end
end)
I see one tho
I will try this solution soon too
That is in a tool. Not in the workspace directly. In a tool local scripts do infact work.
Well, since @NoxhazeI logic is completely correct and it should indeed work, you sure you don’t have another object that looks the same overlapping it? Like, is “Red
” meant to be another disk that you copied but forgot to change its colour or make it transparent?
(Just a last rebound, I am pretty lost in your conundrum)
I’ve removed the object “Red” still facing the same issue
Is it possible that it could be a bug from Roblox engine. As the local script only has 2 lines that play its role with the Yellow part and do their job correctly and do not overlapp the transparency script or anything since it only runs once.
Have you tried my method of testing it on another baseplate?
Here is a video to make it more clear
Probably compiler issue
when you insert the cd is that triggering on a local script or regular script?
because you could probably have a local varible that looks like
local plr:players
and use that varible to save who is using it
The local script makes the already part in the model visible and deletes the CD in your backpack as if you put it in after you click the grey part while holding the CD. After that the player can remove it when the Yellow part is visible which is supposed to clone the CD into your inventory and make the yellow part invisible as if you picked it up but the problem is the yellow part does not go invisible.
If that is the case is it possible to get Roblox themself in here?