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

Hopperbin connecting script?

Asked by
j1011 0
9 years ago
bin = script.Parent
owner = hit.OwnerName
function onButton1Down(mouse)
local hit = mouse.Target

if hit == nil then return end
if hit.ClassName == "Part" and
    owner.Value == script.Parent.Parent.Parent.Name then
    hit.ClassName.Locked = false
    else
    hit.ClassName.Locked = true
end
end

I have a hopperbin at starterpack this drags a part, and the part have stringvalue name OwnerName with value of Player1. what i wanted is if the player tries to drag this part and the ownername value is equal to player then the part locked is false. I tried everything playing with properties but i can't get it..

0
hit.ClassName.Locked? ClassName is a string property, not a child/table fanofpixels 718 — 5y
0
also HopperBins or depracated just make a tool with RequiresHandle set to false fanofpixels 718 — 5y
0
also onButton1Down is never connected to the HopperBin's event fanofpixels 718 — 5y

Answer this question