#why does my script do nothing?

1 messages · Page 1 of 1 (latest)

half mesa
#

my script does absolutely nothing, no errors or anything.

cd.MouseClick:Connect(function(player)
    if script.Parent.Parent.CanCollide==true then
        script.Parent.Parent.Transparency=(0.5)
        script.Parent.Parent.CanCollide=false
        
    end
    
    if script.Parent.Parent.CanCollide==false then

        script.Parent.Parent.Transparency=(0)
        script.Parent.Parent.CanCollide=true
    
    end

end)

quartz sundial
#

@half mesa cd=script.Parent

cd.MouseClick:Connect(function()
if script.Parent.Parent.CanCollide==true then
script.Parent.Parent.Transparency=(0.5)
script.Parent.Parent.CanCollide=false
elseif script.Parent.Parent.CanCollide==false then
script.Parent.Parent.Transparency=(0)
script.Parent.Parent.CanCollide=true
end

if script.Parent.Parent.CanCollide==false then



end

end)

half mesa
#

@everyone troll

quartz sundial
#

bro 😭

half mesa
#

?

quartz sundial
#

ur script didnt work i fixed it

supple pecan
#

Insane

west python
#

huh

#

Script.parent.parent doesnt exist

#

wait

#

Do you have a part with a clickdetector and a script inside

#

Because then dont put the script in the clickdetecter

#

Just put it in the part with the clickdetector

#

local cd = script.Parent:FindFirstChild(“Clickdetector”)
local part = script.Parent
cd.MouseClick:Connect(function(player)
if part.CanCollide = true then
part.Transparency = 0.5
part.CanCollide = false
elseif part.CanCollide = false then
part.Transparency = 0
part.CanCollide = true
end
end)

#

No offense but how did you make that script

#

Its like