Skip to content
Documentation
Props3Foldable Phones

r_props_foldphone Exports

R_Props Foldable Phones client exports Show, Hide, Fold, Unfold, Toggle, IsOut, IsOpen, PhoneOpen and PhoneCall.

All exports are client side and act on the local player. Everyone nearby still sees the phone and the fold.

Show

exports.r_props_foldphone:Show('duo', 'white')
exports.r_props_foldphone:Show('flip')
exports.r_props_foldphone:Show()
ParameterTypeDescription
phonestring?'fold', 'duo' or 'flip'. Defaults to R.DefaultPhone.
colourstring?A colour of that phone. Defaults to its first colour.

Takes the phone out, closed. Returns true, or false if the phone or colour doesn't exist.

Hide

exports.r_props_foldphone:Hide()

Puts the phone away.

Unfold, Fold, Toggle

exports.r_props_foldphone:Unfold()
exports.r_props_foldphone:Fold()
exports.r_props_foldphone:Toggle()

Opens, closes or flips the phone that is out, with the same animation as the fold key. Nothing happens if no phone is out, a fold is still playing, or the player is driving with R.UnfoldWhileDriving = false.

IsOut, IsOpen

if exports.r_props_foldphone:IsOut() then
    local open = exports.r_props_foldphone:IsOpen()
end

IsOut returns true while a phone is in the hand. IsOpen returns true while it is unfolded.

PhoneOpen, PhoneCall

exports.r_props_foldphone:PhoneOpen(true)
exports.r_props_foldphone:PhoneCall(true)

For hooking up a phone script other than LB Phone. PhoneOpen(true) takes out the R.PhoneScriptPhone foldable when your phone UI opens, PhoneOpen(false) puts it away when it closes, and PhoneCall(true) keeps it folded during a call. Your phone script plays the hand animations: unfold, hold_open and fold from r_foldphone_anim (Fold) or r_foldduo_anim (Duo), and the hinge follows them.