The issue is on the last two lines.
--YOUR SCRIPT--
if game.Workspace.BasePlate.Transparency = 0
then game.Workspace.Player1.Head:Destroy
---------------
First, there are "=" and "==". The first is used to set the value of something, while the second ("==") is used when checking if it equals something. For this reason you would use == instead on = there.
Second, the "then" needs to follow on the same line as the "if". For example, if 1==1 then.
Third, when using methods such as Destroy, Clone, FindFirstChild, etc... You need to state that it is a method by using parenthesis. For example Part:Destroy()
Forth, because you started a conditional statement (if ... then), you must also let the code know where the end of that statment is. We do that by including "end".
Example:
if 1+1 == 2 then
print("Hello World")
end
---------------
Recommendations:
> You can use Workspace.BasePlate instead of game.Workspace.BasePlate.
> You could shorten your code by about 12 lines by using a For Loop.
|