I looked up the context service and still am having trouble figuring out what I'm supposed to do to make the Pen tool work for IOS/Tablet users. Here is a link to the model so you can take a quick look at it: http://www.roblox.com/Pen-item?id=270659368 The pen is being used in an obby and I'll supply the link if anyone needs it.
COMMUNITY QUESTION
How would I make the following "Pen" tool work for Tablet users?
1 answer
Use the UserInputService to see if the software is touchscreen, next get the mouse and sees when he clicks, when that happens just use mouse.hit.p to find the cframe the mouse is at.
local userinputservice = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local on = false
local pen = player.Character.Pen --The pen
function touchscreen()
return userinputservice.TouchEnabled
end
mouse.Button1Down:connect(function()
on = true
while on wait() do
pen.Center.CFrame = mouse.hit.p --Replace Center with the part you want to be over the mouse.
end
end)
mouse.Button1Up:connect(function()
on = false
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
And what do I do with that code? What part would go over the mouse?
Thank you so much. It worked.