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

I have 2 Parts and they're doing nothing when I click on them when they're coded correctly?

Asked by 6 years ago

I have 2 parts in my game that are supposed to change 2 things.

One is the Blue Part and two is The RedPart.

The Blue part controls the first thing which would be allowing eveyone to (including people who don't have the VIP and/or Water Fighting Area Access Pass.

The Red part controls the second thing which would be the cave that takes you to a ban hammer giver.

The Problem is that nothing's happening when you click any of them.

RedPart

local function onMouseClick(player)
    game.Workspace.Stone1:Destroy
    game.Workspace.Stone2.CanCollide = true
    game.Workspace.Stone2.Transparency = 0
    game.Soundscape.Landslide:Play()
end

clickDetector.MouseClick:connect(onMouseClick)

Blue Part

local function onMouseClick(player)
    game.Workspace.wfaAccess:Destroy()
    game.Workspace.TrueVIPDoor:Destroy()
end

clickDetector.MouseClick:connect(onMouseClick)

Output and Script Analysis are saying nothing about the blue part but Script Analysis is saying that a string is needed in a spot that's a location which the only space is in CanCollide = true Space ^ ^ Space

0
FE is disabled robertwoodsy5115 16 — 6y
0
In the first script, Destroy should be Destroy() as its a method. Thetacah 712 — 6y
0
Make sure there is a variable named clickDetector batmen101 2 — 6y

Answer this question