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

it says clickdetector is not a valid member of workspace?

Asked by 6 years ago

this= Script.Parent

this.ClickDetector.MouseClick:connect(function(plr) local UserInputService = game:GetService('UserInputService') local Anim = plr.Character.Humanoid:LoadAnimation(this.Anim) local gui = game.ReplicatedStorage.ScreenGui:Clone() local gui2 = game.ReplicatedStorage.ScreenGui2:Clone() this.ClickDetector:Destroy() Anim:Play() this.Transparency = 1 game.Workspace.ParticlePart.ParticleEmitter.Enabled = true gui.Parent = plr.PlayerGui UserInputService.InputBegan:connect(function(input) if input.KeyCode == Enum.KeyCode.E then if plr.PlayerGui:FindFirstChild('ScreenGui') then plr.PlayerGui.ScreenGui:Destroy() gui2.Parent = plr.PlayerGui if input.KeyCode == Enum.KeyCode.X then plr.PlayerGui:FindFirstChild('ScreenGui2'):Destroy() game.Workspace.ParticlePart.ParticleEmitter.Enabled = false wait(0.1) Anim:Stop() this.Transparency = 0 end end end end) end)

0
Please put it in code block so it's easier to read. Conquesias 85 — 6y
0
^ Indeed greatneil80 2647 — 6y
0
^If you don't know how to do that you highlight it and click the blue lua button in the question. TiredMelon 405 — 6y

Answer this question