#i need help making my sleep system work

1 messages · Page 1 of 1 (latest)

umbral aurora
#

the sleep system i took off of the toolbox and i am trying to make it a function so i can trigger it when the proximity prompt is activated i am a beginner and ready to be burned at the stake for my horrible code i just need help with the sleep but other reccomnedations will be appreciated

frosty viper
glass fossil
#

Fr

celest bloomBOT
#

studio** You are now Level 7! **studio

frosty viper
#

the gui in starter gui is replicated to player's gui on spawn

umbral aurora
#

so what should i do in the script? sorry im like really new lol

#

@frosty viper

frosty viper
#

I would reccomend putting the script directly inside the gui because it makes it easier to access and edit the gui

umbral aurora
#

no its in a normal script attached to a proximity prompt in a part

#

thats bad isnt it

frosty viper
umbral aurora
#

okay i did that

fossil trellis
umbral aurora
#

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

frosty viper
#

--- 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

umbral aurora
#

i put the server script in server script service?

celest bloomBOT
#

studio** You are now Level 1! **studio

frosty viper
umbral aurora
#

okay

frosty viper
umbral aurora
#

what does?

frosty viper
umbral aurora
#

okay

#

do iput it in the existing script or a diffrent one?

frosty viper
#

js delete everything and paste new one

#

or comment out old one

umbral aurora
#

okay so like this?

frosty viper
umbral aurora
#

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?

frosty viper
umbral aurora
#

yes

frosty viper
#

put that in the client script one

umbral aurora
#

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

frosty viper
umbral aurora
#

you might cry but okay

frosty viper
#

aldo why are you deleting the gui afterwards

#

doesnt it need to be reused

#

just set transparency to 1 or disable the screengui

umbral aurora
#

idk i took this off the tool box

#

ill be back in a little my sister needs help with somehting

frosty viper
#

oops

#

.OnClientEvent

#

@umbral aurora

#

change it to that

umbral aurora
#

Okay I’ll be able to check in a bit

brazen jewel
#

sybau

umbral aurora
#

im so sorry for taking so long but thank you so much it works