Hello fellow developers! I am trying to make a very simple script to test out the Mouse.Hit thing because I have never used that before, but this doesn’t seem to be working. The purpose of the script is to make a new part where the player clicks. Down bellow I have put the Explorer and the Script. Please help me!
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
local tool = script.Parent
tool.Activated:Connect(function()
local part = Instance.new("Part", workspace)
part.Position = mouse.Hit.Position
end)
Yes! Finally thanks so much! This means that I can start making horrible and evil creations! Why would you give me this power? What foolish person would do that? I am thankful but the rest of the world probably isnt lol. anyways thanks again