#Need help with a button script
52 messages · Page 1 of 1 (latest)
"Need help with a button script"
Read it again
so
Need help?
Send script
Get help
Be happy
Why not here? Not like anyone would need your script lol
Such precious script
Anyway, lemme read again what you need
Hm... Server side or Client side?
You want to be for everyone of the server or just for the player that clicked?
Server side then
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1)
local deb = false
local wall = game.Workspace.Wall
local WallTransTrue = TweenService:Create(wall, tweenInfo, {Transparency = 1})
local WallTransFalse = TweenService:Create(wall, tweenInfo, {Transparency = 0})
script.Parent.MouseClick:Connect(function()
if deb == false then
WallTransTrue:Play()
deb = true
else
WallTransFalse:Play()
end
end)
If you have any questions regard the script, ask me
No, you dont need that part of the script, just the one I gave you
Anything in Output?
** You are now Level 3! **
Pro Tip: Have only Explorer, Properties and Output opened, nothing else really matter when you are scripting
Same script I've sent you?
Hm...
Open the script press CTRL+A > CTRL+C and paste here
I'm pretty sure you have something else typed there
hm
When you press the error, what script it opens?
No
Huh
Working just fine for me
Mind to try it again?
Shouldn't have anything with the script
Cool
next time
Remember
Um... No
Maybe someone with the same issue will find this or at least will learn something
Working just fine for me
Only the script matter, the rest you just need to get the path of instances
Isnt this what you want?
To "open" the wall, then "close" the wall and after that it will not work?
So you just want to be able to click that part and "open/close" the wall every time you click?
Oh....
Easy then
Not even a little
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1)
local open = false
local wall = game.Workspace.Wall
local WallTransTrue = TweenService:Create(wall, tweenInfo, {Transparency = 1})
local WallTransFalse = TweenService:Create(wall, tweenInfo, {Transparency = 0})
script.Parent.MouseClick:Connect(function()
if open == false then
open = true
WallTransTrue:Play()
else
open = false
WallTransFalse:Play()
end
end)