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

Why is this TextButton LocalScript doesn't run?

Asked by 5 years ago
Edited 5 years ago

Okay so , the script is really simple but for "some reason" it doesn't work whenever i click the TextButton..

local graphic = game.Lighting.Graphics["Only Baseplate"]:clone() --This is a Model
local camera = game.Workspace.CurrentCamera
local checkgfx = script.Parent.Parent.Parent.Low.Value --BoolValue
local gfxmedium = script.Parent.Parent.Parent.Medium.Value --BoolValue
local gfxhigh = script.Parent.Parent.Parent.High.Value --BoolValue
local medium = game.Workspace.CurrentCamera:WaitForChild("Less Details",86400) --This is a Model
local high = game.Workspace.CurrentCamera:WaitForChild("More Details",86400) --This is a Model

function run()
    print("Graphics Changed , Hopefully")
    if checkgfx == false then
        print("Graphics Changed , Hopefully")
graphic.Parent = camera
checkgfx = true
gfxhigh = false
high:Destroy()
gfxmedium = false
medium:Destroy()    
script.Parent.Parent.Parent.H.X.Text = " "
script.Parent.Parent.Parent.M.X.Text = " "
script.Parent.Text = "X"
    elseif checkgfx == true then
    print("You are using this , still")
    end
end


script.Parent.MouseButton1Down:connect(run) --Down and Click doesn't work , i don't know why


i put 2 print()s cuz i wanted to see if it works but it didin't show the print aswell :s Please someone help. i'll credit the person who helped me on my game.

0
(Line 28) :connect() is deprecated. Use :Connect(). mudathir2007 157 — 5y
0
same thing , nothing happend. Sphynks 2 — 5y
0
Line 1, it’s Clone not clone. Also don’t put things in Lighting.Since it is a local script, put it in replicatedstorage and get it from there. User#19524 175 — 5y
0
The clone doesn't matter , all im trying to figure out is the MOUSEBUTTON1DOWN , when i click it it doesnt print out anything to the console. Sphynks 2 — 5y
View all comments (2 more)
0
It does matter. Deprecated code doesn’t work and causes problems . User#19524 175 — 5y
0
i dont know BinderBigpopsWind -12 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Remove the .Value in lines 3-5. In lines 11, 14-15, and 22, add the .Value.

0
done it , still it doesn't do nothing. Sphynks 2 — 5y
Ad

Answer this question