So I’ve been seeing these people like my code posts, and I appreciate it. But the only thing I’m thinking is that are they stealing my code? Because their user profile is hidden.
This one happened recently.
So I’ve been seeing these people like my code posts, and I appreciate it. But the only thing I’m thinking is that are they stealing my code? Because their user profile is hidden.
Well you are posting your code to a public forum, and you know no offense but considering your code is kind of basic/unoptimized:
– Setting a constant inside of the function.
local maxPower = 50
– not using a clamp or math.min
if power > maxPower then
power = maxPower
end
– not using an epoch, which is technically optional.
task.wait(.2)
debounce = false
your code is not ground breaking and I wouldn’t consider something so basic as stolen, just re-used in a game that probably isn’t gonna do any good.
I hope this doesn’t offend you but even MaximumADHD and other scripters are well aware of people decompiling their games, and/or stealing code from GitHub but they know only people with their mindset can do anything with the code.
Yeah, I had no idea what I was thinking when I made that.
they’re Visitor rank users who like posts to rank up to Member
No idea but, if you post it online you can’t say it is being stolen.
No cuz im actually done with ts.
Link to post: Placement System Problem and Surface and Terrain - #2 by ig1oo1
local runservice = game:GetService("RunService")
local block = game.Workspace:WaitForChild("Block")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local maxDistance = 999 -- max distance player can place block
local gridSnapSize = 1 -- the size of the grid that the block snaps to
local function gridSnap(value: number | Vector3, gridSize: number)
if typeof(value) == "Vector3" then
return Vector3.new(
math.floor(value.X / gridSize + 0.5) * gridSize,
math.floor(value.Y / gridSize + 0.5) * gridSize,
math.floor(value.Z / gridSize + 0.5) * gridSize
)
elseif typeof(value) == "number" then
return math.floor(value / gridSize + 0.5) * gridSize
end
end
runservice.RenderStepped:Connect(function()
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
raycastParams.FilterDescendantsInstances = {player.Character, block}
local raycastResult = workspace:Raycast(mouse.UnitRay.Origin, mouse.UnitRay.Direction * maxDistance, raycastParams)
if raycastResult then
local targetPosition = raycastResult.Position + (Vector3.yAxis * block.Size.Y/2)
block.Position = gridSnap(targetPosition, gridSnapSize)
end
end)
Link to his post: Placement System Problem and Surface and Terrain - #3 by twc89403
local runservice = game:GetService("RunService")
local block = game.Workspace:WaitForChild("Block")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local maxdistance = 100 -- The distance in studs until the preview will stop updating
runservice.RenderStepped:Connect(function()
local RaycastP = RaycastParams.new()
RaycastP.FilterType = Enum.RaycastFilterType.Exclude
RaycastP.FilterDescendantsInstances = {player.Character, block}
local mouseposition = workspace:Raycast(mouse.Origin.Position, mouse.Origin.LookVector * maxdistance, RaycastP)
if mouseposition then
local x = math.round(mouseposition.Position.X)
local z = math.round(mouseposition.Position.Z)
local y = math.round(mouseposition.Position.Y) + block.Size.Y / 2
block.Position = Vector3.new(x, y, z)
end
end)
Link to Post: Placement System Problem and Surface and Terrain - #5 by ig1oo1
@twc89403 literally just copied and pasted my code but made it worse. My code allows you to change the grid size that you want the block to snap to. I have no idea why you marked this stolen code as the solution.
Copied
Copied
Copied
Copied but “simplified” so it’s worse
Copied the + block.Size.Y / 2
Feel ashamed of yourself ngl; that’s pretty petty. Oh, and guess what? His profile is hidden. What a coincidence!
it happens trust me, it’s funny that he used your code but made it worse ![]()
also please make your RaycastParams outside of your RenderStepped, I can’t remember where I had seen this but apparently it will use up a lot of memory, again I don’t know if this is true nor do I remember where I heard this, I just randomly started doing it, I guess.
whoops didnt realise that. that was a rookie mistake on my part
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.