#Gun my friend is trying to make a gun, i dont even know myselfBut i'm willing to help
1 messages · Page 1 of 1 (latest)
I need a team who is willing to only get paid if the game becomes successful as well as hope learning how to script a gun
I myself do not have a laptop/pc anymore so I couldn't help even if I want it to which i do But knowledge is key
You are not going to find any professional developers who will work for free
That is simply not how this world works
No harm in hoping 
Im trying to find the best way to fix this
What is it you need fixed?
I have basic code AI ofc but i don't know if it will work
I try making a game myself back in the day.But I lost everything from my family and my main account region got switched over to VNG
So I don't have access to studios. No more like I used to used to
^
-- This function runs every time something touches the part
local function onTouch(otherPart)
-- Look for a "Humanoid" inside whatever touched the part
local character = otherPart.Parent
local humanoid = character:FindFirstChild("Humanoid")
-- If a Humanoid was found, set its health to 0
if humanoid then
humanoid.Health = 0
end
end
-- Connect the function to the 'Touched' event
trapPart.Touched:Connect(onTouch) ```
local remoteEvent = game.ReplicatedStorage:WaitForChild("ShootEvent")
remoteEvent.OnServerEvent:Connect(function(player, targetPosition)
local character = player.Character
local gun = character:FindFirstChildOfClass("Tool")
if not gun then return end
local startPosition = gun.Handle.Position
local direction = (targetPosition - startPosition).Unit
-- Raycasting to find hit target
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {character}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
local raycastResult = workspace:Raycast(startPosition, direction * 300, raycastParams)
if raycastResult then
local hitPart = raycastResult.Instance
local model = hitPart:FindFirstAncestorOfClass("Model")
if model then
local humanoid = model:FindFirstChild("Humanoid")
if humanoid then
humanoid:TakeDamage(10) -- Damage amount
end
end
end
end)
This is all
I would assume I would need to first make a server script before moving on to weapons
What's not working?
That's the problem I have no way to test it
And hes gone as of this moment right now
Ok thank you so much
I kinda get paranoid some times
But if you wouldn't mind, do you know anywhere?I could learn how to script?
Tons of places
Oh
Bet
If I could close this myself, I would and I have no way to say thank you the most
how will someone know how to script from their local library?
🤔
This was a big hope.