I want to make a script where if i'm close enough to a door, it gives the option to open it. I had this question answered already but i don't understand.
✓ ANSWER ACCEPTED
Can someone explain ContextActionService to me?
2 answers
Ok here is my example for u about CAS
local contextActionService = game:GetService("ContextActionService")
local player = game.Players.LocalPlayer
function JumpHigh()
print 'Hi'--enter ur code
end
contextActionService:BindActionToInputTypes("jump", JumpHigh, true, "j")
contextActionService:SetTitle("jump", "Super Jump") --This text will still appear over the image. If you don't want the text at all, you can just delete this line.
contextActionService:SetImage("jump", "http://www.roblox.com/asset/?id=67588212";) --This line will put a picture for the button. Just change the Asset ID to any decal you'd like.
This discussion is preserved as it was. New answers, comments, and votes are closed.
