#i need help making my sleep system work
1 messages · Page 1 of 1 (latest)
you're changing the transparency of the gui that's inside starter gui rather than actually modifying the player's gui
Fr
** You are now Level 7! **
this only makes it so when they respawn the changes apply
the gui in starter gui is replicated to player's gui on spawn
is this in a local script
I would reccomend putting the script directly inside the gui because it makes it easier to access and edit the gui
no its in a normal script attached to a proximity prompt in a part
thats bad isnt it
put a remote event inside replicated storage
okay i did that
also i recommond using TweenService instead of using the loops
im trying to learn tweening but i dont fully understand it yet
i heard its really good to use for animations and making a game more polished
--- server script
local event = game.ReplicatedStorage.SleepEvent
script.Parent.Triggered:Connect(function(player)
event:FireClient(player)
end)
---client script (parented under the sleepgui frame and its a local script)
local sleepGUI = script.Parent
local event = game.ReplicatedStorage.SleepEvent
event.OnClientEvent:Connect(function()
-- script for tweening the transparency
print("test")
end)
--- remote event (place a remote event parented under replicated storage and name it "SleepEvent"
@umbral aurora
detects when someone activates the proximity prompt and then tells the script inside their gui to make the gui transparent
i put the server script in server script service?
** You are now Level 1! **
no under the proximity prompt
okay
@umbral aurora nvm i forgot it needs to be parented to the proximity prompt
what does?
the server script
existing one
js delete everything and paste new one
or comment out old one
okay so like this?
yeah
the i put the loop i had in the server script?
wait no
i put the loop or tween in the script in the frame?
the transparency one?
yes
put that in the client script one
okay
so it plays the sound but dosnet make the screen fade to black how the fade to black works is its just a black screen and it can fade in or out just by controlling the transparency but you prob knew that
wait nvm the sound has nothing to do with this
show me the explorer and the console (f9)
you might cry but okay
aldo why are you deleting the gui afterwards
doesnt it need to be reused
just set transparency to 1 or disable the screengui
idk i took this off the tool box
also heres the stuff
ill be back in a little my sister needs help with somehting
Okay I’ll be able to check in a bit
sybau
im so sorry for taking so long but thank you so much it works