I tried using your script and the imagelabels still don’t appear. I’ll use sufsty’s script and see if it works
I tried using your script and the imagelabels still don’t appear. I’ll use sufsty’s script and see if it works
The script you just posted also says this
because you use double == use only one
GUI.Toggle.Value = true
and sorry for mistake again
Also i’m trying to make it so that the whole server sees it so idk if playergui is only client sided or server sided
yeah I am pretty sure it is only client sided. I think that the elseif was fine but at the beginning of the script you should define the player.
what type of label was it? int bool or string?
OH crap! I remember! you gotta add a wait at the end of : local GUI = script.Parent.Parent
local plr = game.Players.LocalPlayer
local Image = plr.PlayerGui.UpdateGUI.PathChosen
Do i do game.StarterGui instead? becuase i want the whole server to see it
I think I know what to do: local t = script.Parent
script.Parent.MouseButton1Click:Connect(function()
for i = 1,100 do
t.BackgroundTransparency -= 0.01 --- u put ImageTransparency
wait(0.01)
end
end)
idk how to make it fade in again
don’t listen to me I am in experienced
Don’t worry. An experienced scripter is here
I have several questions:
Are you making it so that one player activates it and then everyone sees it?
Can we see the explorer hierarchy for it? I need to know what is what.
Are you aware of tweenservice?
idk how to make the whole server see it sadly
I changed the script, this is the new one.
So basically before i send the script, here’s where everything is:
This is the script inside a button
And this is the button in the game:
This is the Image i want to display
And this is it in the explorer tab
local GUI = script.Parent.Parent
local plr = game.Players.LocalPlayer
local Image = game.StarterGui.UpdateGUI.PathChosen
local function FadeIn()
for i = 1, 0, -0.02 do
wait(0.02)
Image.ImageTransparency = i
end
Image.ImageTransparency = 0
end
local function FadeOut()
for i = 0, 1, -0.02 do
wait(0.02)
Image.ImageTransparency = i
end
Image.ImageTransparency = 1
end
script.Parent.MouseButton1Click:Connect(function()
FadeIn()
wait(5)
FadeOut()
end)
and also with the new script i don’t want to make it so that when clicked again it fades out, I want to make it so that when it’s clicked once, it fades in, waits 5 seconds then fades out
Hey! Yeah i’m trying to make it so that one person clicks on it and the whole server sees it but I got a script that makes it so that the button is only seen by a specific role.
I posted everything related to the script in a response to sufty’s message!
hmmm to make the whole server see it I can’t help u but to make it fade I can help
Also i forgot to answer the third question, I know what tweenservice is i just don’t know how to use it because it’s complicated
First thing first, put the “Path Chosen” image inside of replicated storage instead of starter gui. Put it as a direct child of replicated storage. Next, make 2 remote events,1 called “PathChosenEvent” and the other called “DisplayImageEvent” put them inside replicated storage as well.
local TweenService = game:GetService("TweenService")
local MainFrame = script.Parent.Parent.Parent
local StoryUpdates = MainFrame.Parent
local Image = game.ReplicatedStorage.PathChosen:Clone()
Image.Parent = StoryUpdates.Parent.UpdateGUI
Image.BackgroundTransparency = 1
local PathChosenEvent = game.ReplicatedStorage.PathChosenEvent
local DisplayImageEvent = game.ReplicatedStorage.DisplayImageEvent
script.Parent.Activated:Connect(function()
PathChosenEvent:FireServer()
end)
DisplayImageEvent.OnClientEvent:Connect(function()
local tweeninfo = TweenInfo.new(1)
local tween = TweenService:Create(Image,tweeninfo,{BackgroundTransparency = 0})
tween:Play()
tween.Completed:Connect(function()
tween:Destroy()
end)
task.wait(5)
local tween2 = TweenService:Create(Image,tweeninfo,{BackgroundTransparency = 1})
tween2:Play()
tween2.Completed:Connect(function()
tween2:Destroy()
end)
end)
---------SERVER SCRIPT
local PathChosenEvent = game.ReplicatedStorage.PathChosenEvent
local DisplayImageEvent = game.ReplicatedStorage.DisplayImageEvent
PathChosenEvent.OnServerEvent:Connect(function(player)
local valid = true
--check if the player is the person who's supposed to activate the button.
--if its not, set valid to be false
--also do more sanity checks as neccesary
if valid then
DisplayImageEvent:FireAllClients()
end
end)
For everything under “Server Script” put them in a server script somewhere.