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

I am trying to use a remote events to change a GUI and yet it is not working. Any help?

Asked by 3 years ago
Edited by imKirda 3 years ago

I am working on a game, and I decided to add a small alarm text. I used Remote Events to try to change the GUI's Enabled Status but despite the rest of the main script working, the GUI did not show. If I could get some help, that would be great. Main Script

local player = game:GetService("Players").LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Alert = ReplicatedStorage:WaitForChild("Alert")
local AlertGone = ReplicatedStorage:WaitForChild("AlertGone")
local part = script.Parent.Parent
local cooldown = false
local sound = part.Sound
local Up = Vector3.new(nil, 0.5, nil)
local down = Vector3.new(nil, -0.5, nil)
local Explosion = script.Parent.Parent.Parent.Parent.Parent.Explosion.Part
if cooldown == true then return end
script.Parent.MouseClick:Connect(function()
cooldown = true
sound:Play()
script["Alert! Alert!"]:Play()
Alert:FireAllClients()
wait(59.999)
AlertGone:FireAllClients()
script.Explosion:Play()
while true do
Explosion.Size = Explosion.Size + Vector3.new(2, 2, 2)  
wait(0.01)
end
end)

Local Script (The other one is practicly the same)

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("AlertGone")
local player = game:GetService("Players").LocalPlayer
local True = true
local LoadPlayerGUI = player:WaitForChild("PlayerGUI")

remoteEvent.OnClientEvent:Connect(player.LoadPlayerGUI.PlayerGUI.Alert.Enabled.True)
0
Don't make your object names spaced out such as: "Alert! Alert!". It's not the best practise, just name it "Alarm". Really, it's not the best to use spaces for names. And WHAT'S THAT .PARENT SPAM OMGGGGGGGG Antelear 185 — 2y

Answer this question