You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
i try to turn on a gui, showing it up.
What is the issue? Include screenshots / videos if possible!
It does the opposite
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Nope
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local gui=game.StarterGui.EndingGui.Background
local ending=gui:WaitForChild("Endin")
local newend=gui:WaitForChild("New")
local function AwardEnding(nam)
gui.Parent.Enabled=true
ending.Text=nam
print(nam)
end
game.ReplicatedStorage.Endings.OnServerEvent:Connect(function(nam)
if typeof(nam)=="string" then
AwardEnding(nam)
else
AwardEnding("test")
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
The script doesn’t necessarily need to be clientsided for managing UI, Bura is correct.
What you are doing is changing the UI inside the StarterGui and not the player’s UI directly. You can fix this by providing the player as an argument and pathing the UI to PlayerGui.
local PlayerService = game:GetService("Players")
local LocalPlayer = PlayerService.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local EndGui = LocalPlayer.PlayerGui:WaitForChild("EndingGui").Background
local ending= EndGui:WaitForChild("Endin")
local newend= EndGui:WaitForChild("New")
local EndingsRemote = ReplicatedStorage:WaitForChild("Endings")
local function AwardEnding(nam)
EndGui.Parent.Enabled=true
ending.Text=nam
print(nam)
end
EndingsRemote.OnClientEvent:Connect(function(nam)
AwardEnding(nam)
end)
Server Script :
game.ReplicatedStorage.Endings.OnServerEvent:Connect(function(Player,nam)
if typeof(nam)=="string" then
game.ReplicatedStorage.Endings:FireClient(Player,nam)
else
game.ReplicatedStorage.Endings:FireClient(Player,"test")
end
end)
You cant use OnServerEvent on the client also the first argument of OnServerEvent is the player that fired the event
to trigger the AwardEnding function you can run this in localscript
Thanks, it worked, tho I did change the script from server to client and made the remote be bindable event. It works, but now, how do i remove that line in
guis?
Also don’t mind me having a different outfit, im logged in on an another account in the forum
Most of the time guis are in the startergui and after a player joins the experience they get cloned and added into the playergui There are also cases where people put guis somewhere else instead of startergui i assume in your case the arrow you are talking about is in startergui eventually for gui to be visible for the client they need to be parented to the playergui so while playtesting you could also go to your playergui and check the list of guis
go to startergui and select EndingGui if enabled property is false than change it to true than u should be able to see how the ui looks like and once youre done making changes you could set enabled property back to false so its hidden
enabled = property that only applies to guis if its true than gui visible if its false than its hidden
for frames,images and etc theres property called Visible if its true than given instance is visible if its false than its hidden