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

How to make so you spawn in a bed and wake up there?

Asked by 4 years ago
Edited 4 years ago
player = Game.Players["Abandion"]

player.CharacterAdded:Connect(function(chr)

chr:SetPrimaryPartCFrame(game.Workspace.Bed.CFrame)

end

Like how to make so when you join you spawn at in a bed and sleep. And like the screen is like when your eyes opening and then you wake up?

Please answer.

You can answer at discord also ( HugoRoblox #4646 )

Thanks.

0
To pull this off, you will need animations, screen guis, and a lot of code ryan32t 306 — 4y
0
If you have some scripting we can look at, please post it in this post. Just2Terrify 566 — 4y
0
I scripted ( player = Game.Players["Abandion"] player.CharacterAdded:Connect(function(chr) chr:SetPrimaryPartCFrame(game.Workspace.Bed.CFrame) end ii_Hugo013 -5 — 4y
0
Apologies but I meant, post the script in your post with the edit button. Once you hit the edit button, there should be a lua button you can click... between the lines, put the entire script... then save that edit. Done deal. Just2Terrify 566 — 4y
0
I did it. ii_Hugo013 -5 — 4y

2 answers

Log in to vote
0
Answered by
Abandion 118
4 years ago

Use the CharacterAdded event of Player to fire a function when they respawn

player = Game.Players["Abandion"]

player.CharacterAdded:Connect(function(chr)
  chr:SetPrimaryPartCFrame(game.Workspace.Bed.CFrame)
end
0
Please explain a bit more, like step by step. I'm new to script. I'm normally a designer. ii_Hugo013 -5 — 4y
0
If you want them to "wake up" every time they respawn use CharacterAdded, as it fires when the character is rebuilt/added, rather than the player, which is added once and removed once when they join and leave respectively. User#25069 0 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Alright so I can't really do much as I don't have a bed model at the moment nor am at a PC but I can tell you what you need to do.

What you can do to fix this...

Try making a function that can be called when the bed is touched that does what you need it to do. You could try making an if-statement so it doesn't repeat over and over again every time they spawn on the bed. See if either of these fixes your issue. Apologies that I couldn't fix your script but I hope this helps a bit.

Answer this question