Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

(Desperate)Can someone me how to make a turret?

I made a new script and I'm trying to make it so mobile can shoot the turret but I don't have a working turret can anyone help me get one or help me make my own? Here's the script;

local GUI = script.Parent
GUI.MouseButton1Click:Connect(function(hit)
	
end)

2 comments

0

this has been bugging me all day

0

anyone know the anwser?

1 answer

Well I'm not sure if I'm right but it doesn't seem like you're changing the player's health anywhere. Try getting the magnitude of the hit from the ray to the player and then changing the player's health by the desired damage using

Humanoid:TakeDamage(damage)

Because if I'm not mistaken, creating an explosion in Roblox won't hurt you. But I'm still kinda new at Studio so I might be wrong. But give this a try, hope this helps!

4 comments

0

ok thanks

0

it didnt work i thought that the explosion would hurt you at the right blast force rn im creating a new script and see if it works

0

yah no i didnt work

0

Ok hold on, let me get on my computer and try to get it to work ok?

This discussion is preserved as it was. New answers, comments, and votes are closed.