Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Inactive] Why does my keys not work when i try to "drop" the other one?

Asked by 5 years ago
Edited 4 years ago

i have 2 Keycard and they have this script:

01local KeyName = script.KeyName
02local KeyColor = script.KeyColor
03KeyName.Value = script.Parent.Parent.Name
04local colorBlock = script.Parent.Parent.Clr
05colorBlock.BrickColor = KeyColor.value
06 
07script.Parent.MouseClick:Connect(function(plr)
08    local chr = plr.Character
09    local key = script.Parent.Parent
10 
11 
12    if chr:FindFirstChild(KeyName) then
13        local oldKey = chr:FindFirstChild(KeyName)
14        oldKey.Parent = workspace
15        oldKey.WeldConstraint:Destroy()
View all 26 lines...

Workspace: https://imgur.com/a/fWASchb

When you pick one up it does that fine but when you click another one it should drop the one you just picked up and then pick up the other one. idk why it doesnt work but it just doesnt.

Edit: Ive done everything on GnomeCode's tutorial or whatever it is. https://www.youtube.com/watch?v=s-zXAgU_sKA&t

Everything else works fine except the keys

1 answer

Log in to vote
0
Answered by 5 years ago

Go to the keycard tool and look in properties if you setted CanBeDropped to true

0
its not a tool its a object EiOooAxea 70 — 5y
Ad

Answer this question