Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to fix my script for owner detection and gui fading?

The script now works in a way, It does part of what I want but I have another frame in the GUI that I also want faded, I can't put the script in both frames because it only works for the second one for some reason, I also need to change the text transparency of text labels that are children of the frames, using the same script but with text transparency won't work at all.

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")

local TweenService = game:GetService('TweenService')
local function guitween()

	wait(7)
	TweenService:Create( script.Parent, TweenInfo.new(2), {BackgroundTransparency = 1}):Play()
end

RemoteEvent.OnClientEvent:Connect(guitween)

1 comment

0

you didnt even put any code to receive the remote call!!

1 answer

Hi its not working because you didnt put in any code to receive the remote event call, therefore, the remote event cannot reach to the local script.

There are also many things that you have to do!

1st you must put all your code in the localscript into a function so it can all run when the remote call is received.

Heres what it should look like!

local TweenService = game:GetService('TweenService')

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")

local function guitween()

 wait(2)
 TweenService:Create( Parent.Frame, TweenInfo.new(2), {BackgroundTransparency = 1}):Play()
end

remoteEvent.OnClientEvent:Connect(guitween)

Hope this helps!

Any questions? Just ask!

1 comment

0

Haha, I'm only new to scripting which is probably quite clear. This didn't seem to work, it must be something in my eventfire script then?

This discussion is preserved as it was. New answers, comments, and votes are closed.