for some reason my scripts only work in studio but not in the actual game the script that are not functioning are my Mouse1ButtonClick and ClickDetector.MouseClick related script please help. these used to work perfectly fine in the actual game. mousebutton1click script for gui

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.Frame.Visible=true
	script.Parent.Parent.Frame.VoteText.Visible=true
	script.Parent.Parent.Frame.CloseButton.Visible=true
	
end)

MouseClick

local Debounce = false

function onClick()
if not Debounce then
Debounce = true

script.Parent.BrickColor=BrickColor.new("Really red")
Workspace.InvisibleB.Transparency=1
Workspace.InvisibleB.CanCollide=false
wait(2)
workspace.InvisibleB.Transparency=0
Workspace.InvisibleB.CanCollide=true
wait(5)
script.Parent.BrickColor=BrickColor.new("Lime green")

Debounce = false
end

end

script.Parent.ClickDetector.MouseClick:connect(onClick)

3 comments

0

Because Roblox has broken the coding for GUIs. ;(

0

OMG THIS IS FREAKING MADENING

0

but thanks for making me feel its not my fault